module Backend where import Control.Monad import API dynmain :: PType dynmain s r = do if s == [] then do halt "cool! out of elements in list!" [] else do halt ("fun: " ++ head s) (tail s) where halt x y = do putStrLn x >> getLine >> r y