モナド変換子の練習です。 StateモナドにMaybeモナドを乗せてみます。内容はスタック。 import Control.Monad.State push :: a -> StateT [a] Maybe () push x = do xs <- get put (x:xs) pop :: StateT [a] Maybe a pop = do (x:xs) <- get put xs return x…
Quote saved.
Login to quote this blog
Failed to save quote. Please try again later.
You cannot quote because this article is private.