Re: Strange sort behaviour

2010-08-19 Thread Alexander Burger
Hi Jon, > I can accept your explanation, but then I think the docs should make it > clear that the sorted list is what's returned by the function, and that > the state of the "input list" afterwards can be somewhat unpredictable. I agree that the documentation is rather terse, but that's a featur

Re: Strange sort behaviour

2010-08-19 Thread Jon Kleiser
Hi Tomas, I can accept your explanation, but then I think the docs should make it clear that the sorted list is what's returned by the function, and that the state of the "input list" afterwards can be somewhat unpredictable. /Jon > Hi Jon, > >> (let L (3 2 5 4) (sort L) L) >> >> should give the

Re: Strange sort behaviour

2010-08-19 Thread Tomas Hlavaty
Hi Jon, > (let L (3 2 5 4) (sort L) L) > > should give the same result as > > (let L (3 2 5 4) (sort L)) it should not;-) > Why couldn't L simply be given the same value? L is given the same value which you print in the first case. In the second case, you printed out the return value of 'sort'