cond の挙動
DrScheme で cond の挙動を見てましたが
少し混乱してきました。。
(cond 1) ;cond: bad syntax (clause is not a test-value pair) in: 1 (cond (a b) (c d)) ;. . reference to undefined identifier: a (cond (#f 1) (else 2)) ;2 (cond (#f 1)) ; (cond (1)) ;1 <-- 最後の要素のcarが採用!? (cond (#f 1) (#f 2) (3)) ;3 <-- 最後の要素のcarが採用!? (cond) ; <-- なるほど。。 (cond (1 2)) ;2 <-- ?? (cond (1 2) (3 4)) ;2 <-- ??
混乱してきた ><;