Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created June 15, 2017 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/ba4b91da1e635b870daba97dc2c0033a to your computer and use it in GitHub Desktop.
Save deque-blog/ba4b91da1e635b870daba97dc2c0033a to your computer and use it in GitHub Desktop.
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