Skip to content

Instantly share code, notes, and snippets.

View motoyasu-yamada's full-sized avatar

Motoyasu Yamada motoyasu-yamada

View GitHub Profile
use Either Right Left
{{ This type is used to capture the expected error message }}
unique type bowling.Error = Error Text
{{
{score} takes in a list of numbers representing the pins knocked down for each roll of the bowling game, and should return either the total score or an error.
}}
bowling.score : [Nat] -> Either Error Nat
bowling.score rolls =