IO vanuit de stack

Sign in to test your solution.
import Control.Monad (guard) import Control.Monad.Trans.Class (MonadTrans(lift)) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.State.Lazy (StateT(..), get, put) import Control.Monad.Trans.Maybe (MaybeT(..)) -- Stack Manipulation --------------------- type Stack = [Int] push :: Int -> MaybeT (StateT Stack IO) () push x = undefined size :: MaybeT (StateT Stack IO) Int size = undefined pop :: MaybeT (StateT Stack IO) Int pop = undefined add :: MaybeT (StateT Stack IO) () add = undefined mul :: MaybeT (StateT Stack IO) () mul = undefined -- druk een lijn af met de bovenste waarde van de stapel echo :: MaybeT (StateT Stack IO) () echo = undefined
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.