On Mon, 10 Dec 2018 11:48:56 +0000 Paul Sika <p...@ponguibou.com> wrote:
> [...] > I am trying a scheme tutorial using the chicken repl and i see that > (pair? '(1 2 3)) yields true. > is this normal ? > [...] Hello Paul, yes, this is perfectly normal: Every non-empty list satisfies the pair? predicate because lists are linked chains of cons cells. The expression '(1 2 3) can also be represented by the the following more verbose notation, which matches its in-memory structure more closely: '(1 . (2 . (3 . ()))) Everything represented by '(X . Y) or produced by (cons X Y) will satisfy pair?. I hope this helps :-) Ciao, Thomas -- When C++ is your hammer, every problem looks like your thumb.
pgpOUkRfrNXO9.pgp
Description: PGP signature
_______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users