Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
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