6 ms·
Spot on! The code fails as the author has used nil? rather than empty? The recursive call is not from the tail position so tail call optimisation is not possibl
by rachbowyer 11y ago
Spot on! The code fails as the author has used nil? rather than empty? The recursive call is not from the tail position so tail call optimisation is not possible in any language.
- PuercoPop 11y ago> tail call optimisation is not possible in any language. Afaik it is possible in racket. Read the note at the end here: http://matt.might.net/articles/lexers-in-racket/ http://matt.might.net/articles/lexers-in-racket/