This is not a tutoral on monads, nor will I use any math terms here. This is for people who have learned enough about monads to use them, but want to get a better picture of what theyâre doing and why they exist. Functions One way to develop a first intuition about monads is to follow the progression of abstractions from functions to monads. Here is a simple picture of what a function does. Iâve p
ã¢ããã®ãã¹ã¦ã®ç¶ç¶ã¢ããã®ã¨ãããç°¡æ½ã§ãæ¦å¿µã¨ãããã¾ãæ示çã«èª¬æãã¦ãªãã¦ç解ã«è¦å´ããã®ã§ããã¤ã³ããã¡ã¢ã誤ããªã©ãä¹ããææã newtype Cont r a = Cont { runCont :: ((a -> r) -> r) } instance Monad (Cont r) where return a = Cont $ \k -> k a (Cont c) >>= f = Cont $ \k -> c (\a -> runCont (f a) k) æ¦è¦çãªã㨠ç¶ç¶ã¨ããã¤ã¤ãContã表ãã®ã¯ç¶ç¶ã¨ãããããCPSãªé¢æ°ã*1 CPSãªé¢æ°ã¯ãå¼æ°ã«é¢æ°ãã¨ããèªåã®ä»äºã®æå¾ã§ãã®é¢æ°(ç¶ç¶)ãå¼ã¶ã CPSãªé¢æ°ã«ãç¶ç¶ã¨ãã¦å¥ã®CPSãªé¢æ°ã渡ãããã®å¥ã®CPSãªé¢æ°ã«ç¶ç¶ã¨ãã¦ããã«å¥ã®CPSãªé¢æ°ã渡ããâ¦ã®é£éï¼CPSãªé¢æ°ã®ãã¹ãï¼ããå ¨ä½ã¨ãã¦
â [Haskell] The Typeclassopediaã訳ãã¾ãã The Monad.Readerã®Issue 13ã«æ²è¼ãããThe Typeclassopediaã¨ããè¨äºããFunctor, Monad, Monoid, Applicative, Foldable, Traversable, Arrowã¨ãã£ããããªåã¯ã©ã¹ã«ã¤ãã¦è¯ãã¾ã¨ã¾ã£ã¦ãã¦ããã®ããããç¥ãããæã®åã£æããã«ãªãããã ã£ãã®ã§ç¿»è¨³ãã¦ã¿ã¾ããã ä½è ã®Brent Yorgeyããããã許å¯ãããã ããã®ã§å ¬éãã¾ãã翻訳ã«æ £ãã¦ããªãã®ã§å¤ãªæ¥æ¬èªï¼ç¹ã«å°éç¨èªã®æ¥æ¬èªè¨³ã¯ããªãæªããï¼ããã£ãããããããééã£ã¦ãããããããããã¾ããã®ã§ãä½ãè¦ã¤ãããã³ã¡ã³ããé ããã¨å©ããã¾ãã â [Haskell] The Typeclassopedia by Brent Yorgey <first
æãã¢ãããããããããªãã£ãã®ã§ããã¾ãã£ã¦ãããã ⦠ãããã§è¦ãMonadã®èª¬æã§ä¸çªç§ãããããããã¨æã£ãã®ã¯ãWikibooksã®èª¬æãHello World!ããã©ãã¯ããã¯ã¹ãªäººã¯ãæ¯éä¸èªãã (404 Blog Not Found:Haskellã§ä¸çªé£ããã®ã¯ ãã) æåã«ãã® Wikibooksã®èª¬æ ãèªãã ã®ã¯å»å¹´ã® 11 æé ããã®ã¨ãã®ææ¸ã®ãã¼ã¸ã§ã³ã¯Â 05:13, 27 October 2008 ã§ãä»ã¯å 容ãéåå¢ãã¦ãããåã®ææ¸ã¯ãç¾å¨ã® Haskell/Understanding monads/State ã«ç¸å½ããããã ã ã¨ããã§ãä¸è¨ã®è§£èª¬ãæåèªãã ã¨ãå ¨ãæå³ãããããªãã£ãã (@_@;) ã3 Stateful Computationsã ã§ã¯ããã©ã³ãã ãªæ°åãçæããé¢æ°ããä¾ã«æãã¦ã¢ããã®èª¬æãããã¦ããããã©ãä½ãè¨
ã¢ããã®ãã¹ã¦ Haskell ã«ãããã¢ããããã°ã©ãã³ã°ã®çè«ã¨å®è·µã«é¢ããå æ¬çã¬ã¤ã Version 1.1.0 ãã®ãã¥ã¼ããªã¢ã«ã¯ãã¢ããã®æ¦å¿µã¨ãã®é¢æ°ããã°ã©ãã³ã°ã«ãããå¿ç¨ã« ã¤ãã¦ãåä¸ç´ã® Haskell ããã°ã©ãã«ãããããããå©ç¨ä¾¡å¤ããããã㪠解説ããããã¨ãæ¨ã¨ãã¦ãã¾ããèªè 㯠Haskell ã«ãªãã¦ãããã¨ãåæ㨠ãã¾ãããã¢ããã«é¢ããçµé¨ã¯è¦æ±ãã¦ãã¾ããããã®ãã¥ã¼ããªã¢ã«ã¯ãå¤ ãã®é¡æãã«ãã¼ãã¦ãã¾ããå¾åã®ã»ã¯ã·ã§ã³ã§ã¯ãååã®é¡æãããç解ã ã¦ãããã¨ãåæã¨ãã¾ããé ããã£ã¦ãã¢ããããã°ã©ãã³ã°ãä¾ç¤ºãããã ã®ãµã³ãã«ã³ã¼ããããããç¨æããã¦ãã¾ããä¸èªã§ããã¹ã¦ã®é¡æãå¸åã ããã¨ããã®ã¯ãå§ãã§ãã¾ããã ãã®ãã¥ã¼ããªã¢ã«ã¯ 3 ã¤ã®é¨åã§æ§æããã¦ãã¾ããæåã®é¨åã¯ã é¢æ°ããã°ã©ãã³ã°ã«ãããã¢ããã®åºæ¬ç
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}