[racket] Interesting article

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Aug 12 07:57:16 EDT 2010

On Wed, Aug 11, 2010 at 11:06 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
>> 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 was just trying to use a placeholder expression here - I agree that
when you're just mapping `f' over a list, `map' is more convenient.

>> 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?

Yes, but that's an architectural change that would be much harder to
make.  In particular, the whole concept of sequences is a library,
making it difficult or impossible to use it in the true "core".
sam th
samth at ccs.neu.edu

Posted on the users mailing list.