Hi Kashyap, > Could you please tell me why we have the cons(Nil, Nil); in gen3m.c right > after insert(&Intern, "NIL", romSym("NIL", "(Rom+1)")); ?
This allocates a dummy cell, required by 'NIL'. From doc/structures you see NIL: / | V +-----+-----+-----+-----+ |'NIL'| / | / | / | +-----+-----+-----+-----+ ^ | This is the dummy cell This cell is needed to allow for the dual nature of NIL, being both a symbol and as a cell (= empty list). PicoLisp demands that both (car NIL) and (cdr NIL) return NIL. If you do (val NIL) or (car NIL), the CDR of the first cell is accessed, but for (cdr NIL) the access goes to the next cell in memory, i.e. the dummy cell. The CDR of the dummy cell is never accessed. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe