ç¶æ ãã¢ããã§å®ç¾ããæ¹æ³ãèãã¾ãã ãªã¹ã ä¾ã¯ç°¡åãªæ¹ãããã®ã§ããã¼ã¿æ§é ã¨ã㦠Lisp 風ã®ãªã¹ããå®ç¾©ãã¾ãããã data List a = Nil | Cons a (List a) deriving Show ãªã¹ãã¯ããããªé¢¨ã«è¡¨ãã¾ãã Cons "c" (Cons "b" (Cons "a" Nil)) Lisp 風㮠cons ãå®ç¾©ãã¦ã¿ã¾ãããã cons :: a -> List a -> List a cons x xs = Cons x xs cons "c" $ cons "b" $ cons "a" Nil â Cons "c" (Cons "b" (Cons "a" Nil)) ç¶æ ãæã¤ãªã¹ã ãã¦ããã® Lisp 風ã®ãªã¹ãã«ãè¦ç´ ã®æ°ãè¦ãããã¦ããããã¨ãã¾ãããããã¡ãããæ°ããã°åãã¾ãããæ°ããªãã¦ãä¸ç¬ã§åãããã«ãããã®ã§ãã
{{#tags}}- {{label}}
{{/tags}}