returning a freshly allocated list? Chongkai Zhu (09 Apr 2007 00:55 UTC)
Re: returning a freshly allocated list? Aubrey Jaffer (12 Apr 2007 21:43 UTC)

Re: returning a freshly allocated list? Aubrey Jaffer 12 Apr 2007 21:33 UTC

 | From: "Chongkai Zhu" <xxxxxx@cs.utah.edu>
 | Date: Sun, 8 Apr 2007 18:32:48 -0600
 |
 | According to the specification, merge should return a *freshly*
 | *allocated* list as its result.
 |
 | But the reference implementation is:
 | (define (merge a b less? . opt-key)
 |   (define key (if (null? opt-key) identity (car opt-key)))
 |   (cond ((null? a) b)
 | 	((null? b) a)
 |
 | 	...which is trying to avoid allocating as much as possible.
 |
 | Solution: either remove the "freshly allocated" requirement in the
 | specification, or to use (map identity lst) where needed in the
 | reference implementation.

SRFI-Editors: Please remove the words "freshly allocated" from
	      SRFI-95.