[racket] Looping with look-behind and look-forward

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon May 28 11:17:33 EDT 2012

On May 27, 2012, at 10:29 PM, Neil Van Dyke wrote:

> An alternate solution is for people to be discouraged from using the iterators until they know how to do the same thing without the iterators, but I don't expect anyone to agree to that.


for/* are abstractions over common uses of higher-order functions. As such they are perfectly fine. But as I keep emphasizing when I teach this material, map & fold & filter and friends *are* loops and we teach you how to write your own loops first so that you understand what they are and can write your own when everything else fails. BUT one thing I know is that you can't legislate out bad habits :-) 



Posted on the users mailing list.