Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MkBowlingGame (replicate 10 strike) [10, 10] -- OK: The perfect game
MkBowlingGame (replicate 10 strike) [10, 1] -- OK: Almost perfect game
MkBowlingGame (replicate 10 strike) [9, 1] -- OK: Too bad for the last rolls
MkBowlingGame (replicate 10 strike) [10]
-- FAIL: Missing a last bonus roll (there should be 2)
MkBowlingGame (replicate 10 strike) [9, 2]
-- FAIL: Can't find a value of type Either (9 = 10) (LTE 11 10)
MkBowlingGame (replicate 10 (roll 5 5)) [10] -- OK: only spares
MkBowlingGame (replicate 10 (roll 5 5)) [9] -- OK: only spares
MkBowlingGame (replicate 10 (roll 5 5)) [10, 10]
-- FAIL: Only spares but two bonus rolls instead of 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.