by shigemk2

当面は技術的なことしか書かない

対話によるCommon Lisp入門 19 first second third

first とか rest とかは入れ子に出来るし、
リストの2番目、3番目の要素はsecond third…という風に書ける(tenthまで)

[14]> (setf x '(He has ((a charming) (sister))))
(HE HAS ((A CHARMING) (SISTER)))
[15]> (first (rest (third x)))
(SISTER)
[16]> (first (second (third x)))
SISTER
[17]> (first (first (rest (third x))))
SISTER
[18]> (fifth x)
NIL