Re: push1q vs. push1, I'm slightly confused
Hi Jon, > Fine. Then I suggest you change the example for 'push1q' in > doc/refP.html, e.g. using (push1q 'S (1) (2) (3)) and (push1q 'S (2) > (4)), so that one can better see there is a difference between 'push1q' > and 'push1'. Yes, you are right. In fact, I thought about adding this example (and it is already in the unit tests), but I hesitated because it is a negative example (it shows which items are *not* pushed) and is thus not easy to understand. But on the other hand, a bad example is better than no example. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: push1q vs. push1, I'm slightly confused
Hi Alex, Fine. Then I suggest you change the example for 'push1q' in doc/refP.html, e.g. using (push1q 'S (1) (2) (3)) and (push1q 'S (2) (4)), so that one can better see there is a difference between 'push1q' and 'push1'. /Jon On 27. Jan, 2015, at 17:17, Alexander Burger wrote: > Hi Jon, > > On Tue, Jan 27, 2015 at 05:19:39PM +0200, Mike Pechkin wrote: >> Start point to understand difference is difference between (member) >> vs.(memq) and (=) vs. (==) >> http://software-lab.de/doc/ref.html#cmp > > Exactly. > > 'push1q' is in the same line as 'memq', 'delq' or 'asoq'. > > Therefore, 'push1q' will behave different from 'push1' when it gets > things which are equal (according to '='), but not pointer-equal > (according to '=='). > > (push1 'A (1) (2) (3) (1) (2) (3)) > (push1q 'B (1) (2) (3) (1) (2) (3)) > > A -> ((3) (2) (1)) > B -> ((3) (2) (1) (3) (2) (1)) > > ♪♫ Alex
Re: push1q vs. push1, I'm slightly confused
Hi Jon, On Tue, Jan 27, 2015 at 05:19:39PM +0200, Mike Pechkin wrote: > Start point to understand difference is difference between (member) > vs.(memq) and (=) vs. (==) > http://software-lab.de/doc/ref.html#cmp Exactly. 'push1q' is in the same line as 'memq', 'delq' or 'asoq'. Therefore, 'push1q' will behave different from 'push1' when it gets things which are equal (according to '='), but not pointer-equal (according to '=='). (push1 'A (1) (2) (3) (1) (2) (3)) (push1q 'B (1) (2) (3) (1) (2) (3)) A -> ((3) (2) (1)) B -> ((3) (2) (1) (3) (2) (1)) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: push1q vs. push1, I'm slightly confused
hi, Start point to understand difference is difference between (member) vs.(memq) and (=) vs. (==) http://software-lab.de/doc/ref.html#cmp Mike
push1q vs. push1, I'm slightly confused
Hi Alex, I noticed the new 'push1q' function, and wanted to compare it to the old 'push1', which I don’t know very well either. I compared your examples in doc/refP.html, and to me they looked very similar. I also noticed that you used (push1 'S 'b 'd), and not (push1q 'S 'b 'd) in the 'push1q' example, and wondered if that was a typo. Then I re-ran your 'push1q' example (using 32-bit, 3.1.9.6 C), but consequently used 'push1' instead of 'push1q', and I got the very same results! I think you have to explain the difference between these two functions better. ;-) /Jon-- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe