3 ms·
Hadn't seen this one before: http://www.cs.northwestern.edu/academics/courses/325/readings/graham/graham-notes.html http://www.cs.northwestern.edu/academics/co
by briancooley 16y ago
Hadn't seen this one before:
http://www.cs.northwestern.edu/academics/courses/325/readings/graham/graham-notes.html http://www.cs.northwestern.edu/academics/courses/325/reading...
Useful stuff in there.
- zandorg 16y agoAs for Graham's preference about recursion, a Lisp interpreter/compiler should convert recursive loops into queues.
- mahmud 16y agoloops into queues? Control flow into a data structure? If you're gonna a make a 'sufficiently smart compiler' argument, get it right. I think you meant "tail calls into jumps".
- zandorg 16y agoWell, when I want to convert a function that uses recursion but the stack isn't big enough, I make it have a queue where each new item goes on the end, and the next item goes from the front of the queue. This way the stack is replaced by the heap (which is much bigger!).