[r6rs-discuss] [Formal] Map returning twice

AndrevanTonder andre at het.brown.edu
Mon Mar 19 11:49:05 EDT 2007


On Thu, 15 Mar 2007, Abdulaziz Ghuloum wrote:

> If your comment is not going as far as this, maybe it should just say "map 
> should not destructively update the list it returns" instead.

I believe you are correct.  In fact, I suspect the problem can occur if 
intermediate results and local variables are mutated even if they do not form 
part of the returned result.

As a result, the issue of the formal comment may apply not only to procedures 
like map that return new structure, but to other (all?) higher-order 
procedures, including those that do not return a new object.

Andre




More information about the r6rs-discuss mailing list