2009/03/31

[The Little Schemer]car

The Little Schemer」P.5 ~

 

  • The Law of Car
    • The primitive car is defined only for non-empty lists.
    • 組み込み手続きcarは空でないlistに対してのみ有効
    • car
      • カー

 

(car '(a b c))
;; => a
(car '((a b c) x y z))
;; => (a b c)
(car 'hotdog)
;; => error
(car '())
;; => error

 

(car '(((hotdogs)) (and) (pickle) relish))
;; => ((hotdogs))
  • 読み ((hotdogs))
    • "The list of the list of hotdogs"
  • (car l)
    • list「l」の最初のS式は何?

 

(car (car '(((hotdogs)) (and))))
;; => (hotdogs)

0 件のコメント:

コメントを投稿