ãã®è¨äºã®ç®çã¯ãApplicative ä¿¡è ã«ãã Applicative ã¹ã¿ã¤ã«ã®å¸æã§ãã ç°¡æ½ã«çµè«ãè¿°ã¹ãã¨ã foo = do a <- m1 b <- m2 return (f a b) ã®ãããªã³ã¼ããæ¸ããããªã£ãã foo = f <$> m1 <*> m2 ã¨æ¸ãã¾ãããã¨ãããã¨ã åãè¨èã¯ããdo 㨠return ããªããï¼ãã§ãã Functorã¨Monadã®é Functor ãç¹æ®åããåã¯ã©ã¹ãMonadã§ãMonadã®æ¹ãå¼·åã§ãããªããªããã¡ã½ãããå¢ããããã§ãã Functorã®ã¡ã½ããã¯fmapã§ããfmapã®å¥åã (<$>) ã¨ããã¾ãã(ãã®è¨äºã§ã¯ã(<$>) 㨠liftM ãåä¸è¦ãã¾ãã) ããã¦ãMonadã®ã¡ã½ããã¯ããåç¥ã®éã (>>=) 㨠return ã§ãã Functorã¨Monadã®éã«Applicative
{{#tags}}- {{label}}
{{/tags}}