Hi  Kashyap,

> I noticed an odd behavior of sort -
> (setq L '((2) (1) ))
> (sort L)

Note that 'sort' is a destructive function, it modifies the order of cells
in-place. Thus you must use the return value of 'sort', it may return another
cell than was passed to it.

In the above, the return value of 'sort' is ignored and thus lost.

Try either

: (length (sory L))

or

: (setq L (sort L))

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to