Skip to content

Instantly share code, notes, and snippets.

@magical
Created January 8, 2013 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magical/4481926 to your computer and use it in GitHub Desktop.
Save magical/4481926 to your computer and use it in GitHub Desktop.
-- even and odd as mutually recursive infinite lists
import Prelude hiding (even, odd)
module Main where
even = 0:(map (1+) odd)
odd = map (1+) even
main = putStr $ show $ even
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment