[racket] Interesting article

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Wed Aug 11 23:06:43 EDT 2010

> Personally, I find the `for' macros more concise, except when there's
> already a function that I would pass to `map' etc.    Compare:
> (for/list ([x e]) (f x))
> (map (lambda (x) (f x)) e)

Your comparison is perhaps a bit unfair (since you've needlessly
eta-expanded the function), but I agree that if the function hasn't
already been written, it's often easier to just "inline" its body.

> I think the bigger problem from a datatype-genericity point of view is
> that sequences don't have enough operations (sequence-ref,
> sequence-set, etc).

I think that's right.  It's also the case they aren't admitted all the
places in the core that lists are, right?


Posted on the users mailing list.