First time trying a Lisp - I do OOP spaghetti websites with C# for a living, it was the first thing I learned and stuck with it (self-taught and living in the second world)
Even doing trivial problems is giving me migraines, I've been stuck on this for 3 days: 4clojure.com/problem/31
This is a pathetic problem if you can use a variable that holds a state, but nope, everything is a constant. I guess I should be using reduce but have no idea what the reduce function should do, because everything is a constant.
>try to learn lisp via clisp >studying for 3 months >this code is still gibberish
There are too many keywords in lisps. I still can't do question 2 of project euler. I barely know how a lisp loop works
Jacob Gray
car is the first element of a list cdr is the list minus car cadr is the car of the cdr (2nd element) cddr is the list minus the first 2 elements etc. So I'm passing the sequence except the first element every time I call packseq, then I'm saving a list of consecutive elements in rep until it stops repeating (then I append it to the answer). I actually miss this car cdr bullshit when I mess with other languages now.
I started learning clisp 2 months ago by enrolling in an algorithm course, it's tough, professor asked us to implement mergesort, DFS, BFS, dijkstra in a language we had never touched before, of course I haven't fulfilled many assignments but the small stuff I can handle.
Jason Jenkins
it's a fucking macro, which (i guess) means is a sepate entity, not even part of the syntax