Created
October 19, 2014 18:50
-
-
Save jimexist/9e9985c4c720fdddbe57 to your computer and use it in GitHub Desktop.
subset n k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subset :: Int -> Int -> [[Int]] | |
subset 0 _ = [[]] | |
subset _ 0 = [[]] | |
subset n k = [i:y | i <- [k..n], y <- subset (i-1) (k-1)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment