Re: Unexpected behaviour from (sort) with

2016-10-01 Thread Alexander Burger
Hi Rowan, > first sentence at http://www.software-lab.de/doc/refS.html#sort > changed from: > > > Sorts lst by destructively exchanging its elements. > > to something more explicit like: > > > Returns a sorted lst by destructively exchanging the original lst's > > elements. Good idea!

Re: Unexpected behaviour from (sort) with

2016-10-01 Thread Rowan Thorpe
On 30 September 2016 at 20:24, Alexander Burger wrote: > Hi Rowan, > > the explanation is simple. > ... > It is the *return* value of 'sort' which is relevant: > ... Ah, [facepalm], thanks. Because I hadn't used picolisp for a while, when I first used (sort) again in a new

Re: Unexpected behaviour from (sort) with

2016-09-30 Thread Alexander Burger
Hi Rowan, the explanation is simple. > (println A) (sort A) (println A) This is not the right way. Though 'sort' works destructively, this does not mean that it sorts the cells in-place. It is the *return* value of 'sort' which is relevant: (println A) (println (sort A)) or (println

Unexpected behaviour from (sort) with transient-sym-with-leading-numeral-in-cdr

2016-09-30 Thread Rowan Thorpe
I have a perplexing situation with the (sort) function sorting alphanumeric elements, and can't find any explanation in the documentation after searching for a while. Unless I am misunderstanding some painfully fundamental point, this appears to be a bug. When I try to sort alphanumeric