Created
June 12, 2012 06:19
-
-
Save yuanchuan/2915572 to your computer and use it in GitHub Desktop.
Learning Haskell
This file contains hidden or 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
-- 第一印象:使用 Haskell 计算排列组合这样轻而易举。 | |
[ [a,b,c] | a <- [1..10], b <- [1..10], c <- [1..10] ] | |
[ [a,b,c] | a <- [1..10], b <- [1..a], c <- [1..b] ] | |
[ [a,b,c] | a <- "abc", b <- "abc", c <- "abc" ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment