Skip to content

Instantly share code, notes, and snippets.

@knutwalker
Created February 3, 2016 17:32
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 knutwalker/bffc170fc538f829017e to your computer and use it in GitHub Desktop.
Save knutwalker/bffc170fc538f829017e to your computer and use it in GitHub Desktop.
λ> enumFromThenTo 3 9 50
[3,9,15,21,27,33,39,45]
it :: (Enum a, Num a) => [a]
λ> enumFromThenTo 'A' 'C' 'I'
"ACEGI"
it :: [Char]
λ> data Foo = A | B | C | D | E | F | G | H | I deriving (Enum,Show)
λ> enumFromThenTo A C I
[A,C,E,G,I]
it :: [Foo]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment