ligo/gitlab-pages/docs/language-basics/src/unit-option-pattern-matching/flip.mligo

7 lines
103 B
Plaintext
Raw Normal View History

2020-02-06 14:47:41 +04:00
type coin = Head | Tail
let flip (c : coin) : coin =
match c with
Head -> Tail
| Tail -> Head