Skip to content

Instantly share code, notes, and snippets.

@yuanchuan
Created June 12, 2012 06:19
Show Gist options
  • Save yuanchuan/2915572 to your computer and use it in GitHub Desktop.
Save yuanchuan/2915572 to your computer and use it in GitHub Desktop.
Learning Haskell
-- 第一印象:使用 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