Skip to content

Instantly share code, notes, and snippets.

@raichoo
Created June 20, 2016 15:13
Show Gist options
  • Save raichoo/b8d6e627d176e152557adcee4f987a7f to your computer and use it in GitHub Desktop.
Save raichoo/b8d6e627d176e152557adcee4f987a7f to your computer and use it in GitHub Desktop.
module Main
(>>) : Monad m => m a -> m b -> m b
ma >> mb = ma >>= \_ => mb
forever : Monad m => m a -> m a
forever x = x >> forever x
main : IO ()
main = forever (putStrLn "foo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment