Skip to content

Instantly share code, notes, and snippets.

@ikr7
Created March 29, 2016 14:22
Show Gist options
  • Save ikr7/92cd103386b6e7898ebd to your computer and use it in GitHub Desktop.
Save ikr7/92cd103386b6e7898ebd to your computer and use it in GitHub Desktop.
n次元九九
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