Haskell ã§ã¯ãY ã³ã³ããã¼ã¿ãä½ããªãã¨èª¤è§£ãã¦ãã人ãããã®ã§ãã§ãããã¨ã示ãã¨åæã«ãããã¾ã§å¦ãã ãã¨ãã¾ã¨ãã¦ã¿ã¾ãã é 延è©ä¾¡ãæ´»ããã Y ã³ã³ããã¼ã¿ é¢æ°åãç¨ããå帰ã使ã£ã¦ãããªããHaskell ã§ã¯é 延è©ä¾¡ã®ãããã§ãY ã³ã³ããã¼ã¿ãå®ç¾©ã§ãã Y x = x (Y x) ã®éãã«æ¸ãã¾ãã y :: (a -> a) -> a y x = x (y x) Y ã³ã³ããã¼ã¿ç¨ã®éä¹ãå®ç¾©ãã¦ã¿ã¾ãããã fact :: Num a => (a -> a) -> a -> a fact = \f n -> if n == 0 then 1 else n * f (n-1) 以ä¸ã®ããã«åãã¾ãã y fact 4 â 24 ã§ãããã®éä¹ã¯ Haskell ã£ã½ããªãã®ã§ãå ¥ãå£ã§åå²ããããã«æ¸ãç´ãã¦ã¿ã¾ãã fact :: Num a => (a
{{#tags}}- {{label}}
{{/tags}}