scheme - How to have a pair whose second element is a list? -
i'd have pair second element may either symbol or list. example, '(x . y) , '(x . (a b c d)) both valid pairs in context. if second element symbol, can pair cons, if list?
then still use cons scheme printer better @ printing sort of pairs vs other ones. that's reason different.
> (define x '(1 2 3)) > (car (cons 0 x)) 0 > (cdr (cons 0 x)) (1 2 3) scheme lists defined recursively formula
- a list pair of datum , list
'()list. (really that's totally arbitrary , anything,'()strong tradition)

Comments
Post a Comment