News for hackers. Stuff that matters.
Re:SICP is Under Attack by zephyrfalcon on Thursday August 04, 2011 @02:41AM (#2844935)
Yeah, the rewriting goes a bit far for my taste as well... but it is a valid solution, and a purely functional one at that. Yours is valid as well, but introduces local state (which in this case probably doesn't matter, but it's worth noting nonetheless). You could write it this way in Scheme too, using a "let loop" for example, or even using a more imperative style.

There are no comments on this comment yet.