Created
December 15, 2016 22:01
-
-
Save roberto/61a6bc755a2074fe33db1dc78163f826 to your computer and use it in GitHub Desktop.
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
import Html exposing (text) | |
partition n = | |
break (n - 1, 0) | |
break (n, total) = | |
case n of | |
1 -> total + 1 | |
n -> 1 + break(n - 1, total + 1) | |
main = | |
partition 8 |> toString |> text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment