Last active
August 29, 2015 14:12
-
-
Save ToJans/86a8d095e62761469d11 to your computer and use it in GitHub Desktop.
First attempt at the bowling kata in idris
This file contains hidden or 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
%default total | |
||| First pins down range is limited from 0 to 9 or a `Strike` | |
data FirstThrow = FirstPinsDown (Fin 10) | Strike | |
-- ||| Second pins down range should be limited by FirstThrowPinsdown count - 9 or a `Spare` | |
-- ||| This currently isn't; up next: figuring out how to do this; ignore the Spare for now! | |
-- data SecondThrow = Second FirstThrowPinsDown | Spare | |
data SecondThrow = SecondPinsDown (Fin 10) | Spare | |
-- data Frame = OneFrame Strike | TwoFrame SecondThrow | |
works = FirstPinsDown 10 | |
let works' = Strike | |
--let fails = FirstPinsDown 11 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment