ligo/gitlab-pages/docs/language-basics/src/unit-option-pattern-matching/flip.mligo
2020-02-06 11:48:59 +01:00

7 lines
103 B
Plaintext

type coin = Head | Tail
let flip (c : coin) : coin =
match c with
Head -> Tail
| Tail -> Head