Re: help with val
Hi Alexander >Perhaps it helps to see it this way: Yes it helps a lot and thank you very much for taking the trouble to clarify things. Best Regards Dean On 22 November 2016 at 20:52, Alexander Burger wrote: > On Tue, Nov 22, 2016 at 09:22:14PM +0100, Alexander Burger wrote: > > > "The CDR of a symbol cell is also called VAL, and the CAR points to the > > > symbol's tail. " > > ... > > Yes, but note that this talks about the symbol's *cell*, i.e. the > > internal representation as described in doc64/structures. > > ... > > On the language level, a symbol only has a value, properties and a name
Re: help with val
On Tue, Nov 22, 2016 at 09:22:14PM +0100, Alexander Burger wrote: > > "The CDR of a symbol cell is also called VAL, and the CAR points to the > > symbol's tail. " > ... > Yes, but note that this talks about the symbol's *cell*, i.e. the > internal representation as described in doc64/structures. > ... > On the language level, a symbol only has a value, properties and a name. > No CDR :) Perhaps it helps to see it this way: 1. CAR and CDR (in upper case) are the two halves of a cell +-+-+ | CAR | CDR | +-+-+ no matter whether this cell represents a number, a symbol or a list. 2. 'car' and 'cdr' (in lower case) are the functions to access the elements of pairs and lists. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: help with val
Hi Dean, > from ref.html > "The CDR of a symbol cell is also called VAL, and the CAR points to the > symbol's tail. " Yes, but note that this talks about the symbol's *cell*, i.e. the internal representation as described in doc64/structures. > but val seems to equate to car from my tests so I'm confused > : (set 'x 3) > -> 3 > : (car 'x) > -> 3 > : (val 'x) > -> 3 > : (cdr 'x) > !? (cdr 'x) > x -- List expected On the language level, a symbol only has a value, properties and a name. No CDR :) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
help with val
from ref.html "The CDR of a symbol cell is also called VAL, and the CAR points to the symbol's tail. " but val seems to equate to car from my tests so I'm confused : (set 'x 3) -> 3 : (car 'x) -> 3 : (val 'x) -> 3 : (cdr 'x) !? (cdr 'x) x -- List expected