Re: newbie question, 2
On Jan 28, 2:46*am, Jussi Piitulainen <jpiit...@ling.helsinki.fi>
wrote:
> Fyndhorn Elder writes:
> > One of the pitfalls of scheme and lisp programming:
> > (set! otherlist (append (cons item otherlist))
> > is not
> > (set! otherlist (append (list item) otherlist))
>
> What observable difference do you see? (I assume
> the missing parenthesis is not the point, and
> redundant calls are hardly pitfalls.)
Well, the second example does generate a garbage pair while the first
example does not, though I agree that's not a pitfall unless you are
*very* short on memory.
|