by edifice · 16y ago · 0 comments
Doubtless others will disagree though. Maybe we don't all have the same mental strengths and weaknesses.
Recursive cases in languages with tail-call optimization are like inductive reasoning in mathematics - "How long is a list? If it's empty, zero, otherwise one (for the head) plus however long the rest is."
At least in some cases, I think that's the expected result: consider the difficulty of reversing a singly linked list in-place and reversing it applicatively.
There is stuff to learn in every language :)
(Node: I don't no haskell)