2010-04-24から1日間の記事一覧

Gauche でパターンマッチ

11.47 util.match - パターンマッチング Haskell でパターンマッチ分岐すると他の言語でもパターンマッチしたくなる。 (use util.match) (define (match-test ls) (match ls (((a b) c (d e)) (list "a:" a b c d e)) (((a b)) (list "b:" a b)) (((a b) c) …