Created
March 29, 2016 14:22
-
-
Save ikr7/92cd103386b6e7898ebd to your computer and use it in GitHub Desktop.
n次元九九
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
nku :: Integer -> [Integer] | |
nku 0 = error "Oh, Zero! It's Zero! Huh?" | |
nku 1 = [1..9] | |
nku n = concat (map (\x -> map (*x) [1..9]) (nku (n - 1))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment