[plt-scheme] 301.11

From: Greg Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Mon Mar 20 17:31:27 EST 2006

--- "Paulo J. Matos" <pocmatos at gmail.com> wrote:

> I'm quite curious if the current compiler is able to optimize calls
> like:
> (map identity lst) or (srfi1:map! identity lst)?
> Cheers,
> Paulo Matos

In a way, this is part of the motivation for my little evaluator (the
big motivation, of course, is my own education). In a normal order
language, where identity is \x . x, then this is a reduction you ought
to be able to carry our right away (or so I'd think). But applicative
order seems to wreak havoc with this kind of optimization, since in
(\x . x) y you don't even look at \x . x until you've evaluated y.

Gregory Woodhouse  <gregory.woodhouse at sbcglobal.net>

"It is foolish to answer a question that
you do not understand."
--G. Polya ("How to Solve It")

Posted on the users mailing list.