Created
June 15, 2017 15:14
-
-
Save deque-blog/ba4b91da1e635b870daba97dc2c0033a 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
knockedPins : Frame -> List Nat | |
knockedPins (TwoRolls x y) = [x, y] | |
knockedPins Strike = [PinCount] | |
gameRolls : BowlingGame -> List Nat | |
gameRolls (MkBowlingGame frames bonuses) = | |
concatMap knockedPins frames ++ toList (map finToNat bonuses) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment