ãã¦ãæ°åãå¤ã㦠ArrowLoop ãããã¾ããè«æã«æ¸ãã¦ãã loop f b = let (c,d) = f (b,d) in c ã®æå³ãå ¨ãåãããªã㦠Arrow ã®åå¼·ãä¸ã¶æè¿ãåæ»ãã¦ããã®ã§ãããid:MaD ãããç´ æ´ããã解説 http://d.hatena.ne.jp/MaD/20070818 ãæ¸ããã¦ããã®ã§èªåãªãã«åçµãã¾ããloop ã使ã£ã¦æ®éã®ã«ã¼ããä½ãã«ã¯ãå¼æ°ã¨ãã¦é¢æ°ãä¸ã¤ä¸ãã¾ããé¢æ°ã®å㯠(b,d) -> (c,d) ã®ãããªå ¥åºåã¨ãã¿ãã«ã¨ãã¾ããããããå³ã§ç¤ºãã¨ãã¿ãã«ã®å¾ãã®å¼æ°ããããã¨å ¥åã«ç¹ãããå½¢ããã¦ãã¾ãã import Control.Arrow nonsense (b, d) = (b + 1, d * 2) -- *Main> loop nonsense 1 -- 2 -- ãã®ããããç¡ãä¾ã§ã¯ãb +
{{#tags}}- {{label}}
{{/tags}}