Skip to content

Instantly share code, notes, and snippets.

@beala
Last active August 29, 2015 14:07
Show Gist options
  • Save beala/a252fcb54970b7968cd4 to your computer and use it in GitHub Desktop.
Save beala/a252fcb54970b7968cd4 to your computer and use it in GitHub Desktop.
Type of arbitrarily nested list
λ: newtype Fix f = Nest {unFix :: f (Fix f)}
λ: :t Nest []
Nest [] :: Fix []
λ: :t Nest [Nest []]
Nest [Nest []] :: Fix []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment