(replace nil list-of-nil) hangs

Started by hs, May 17, 2009, 05:32:09 PM

Previous topic - Next topic

hs

> (set 'a '( 1 2))

(1 2)

> (replace 1 a)

(2)

> a

(2)

> (replace 2 a)

()

> a

()

> (set 'a '(true true))

(true true)

> (replace true a)

()

> (set 'a '(nil nil))

(nil nil)

> (replace nil a) ;hangs

Lutz

#1
Thanks for this discovery, it happens when all elements are 'nil'. As a work-around use 'clean' instead of 'replace':


> (set 'a '(nil nil))
(nil nil)
> (clean nil? a)
()
>