Skip to content

Instantly share code, notes, and snippets.

@bricklife
Created March 3, 2012 17:34
Show Gist options
  • Save bricklife/1967081 to your computer and use it in GitHub Desktop.
Save bricklife/1967081 to your computer and use it in GitHub Desktop.
generate numbers list
numbers :: Int -> Int -> Int -> [[Int]]
numbers _ _ 0 = [[]]
numbers start end num = [n:ns | n <- [start..end], ns <- numbers n end (num - 1)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment