-
-
Save hardentoo/bba800a7a5d6ad9d172d34d2d98c9084 to your computer and use it in GitHub Desktop.
Integer partitions in haskell
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
ps = [] : map parts [1..] | |
where parts n = [n] : [x : p | x <- [1..n], p <- ps !! (n - x), x <= head p] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment