Skip to content

Instantly share code, notes, and snippets.

@sajith
Created November 25, 2015 16:44
Show Gist options
  • Save sajith/a3a1330481581efbae3f to your computer and use it in GitHub Desktop.
Save sajith/a3a1330481581efbae3f to your computer and use it in GitHub Desktop.
module Forever where
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
loop :: Integer -> IO ()
loop i = forever (print i >> threadDelay (10^4) >> loop (i+1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment