Skip to content

Commit

Permalink
Shortened pattern in petals.
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Apr 10, 2012
1 parent d08ab3e commit 78279da
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions code/haskell/petals/petals.lhs
Expand Up @@ -20,12 +20,9 @@ list of dice rolls.
> petals :: [Die] -> Int
> petals [] = 0
> petals (d:ds) = petals ds + case d of
> One -> 0
> Two -> 0
> Three -> 2
> Four -> 0
> Five -> 4
> Six -> 0
> _ -> 0

Tying it all together
---------------------
Expand Down

0 comments on commit 78279da

Please sign in to comment.