mirror of
https://github.com/anoma/juvix.git
synced 2025-01-07 16:22:14 +03:00
929a8658ac
- Closes #1716 --------- Co-authored-by: Paul Cadman <git@paulcadman.dev>
19 lines
364 B
Plaintext
19 lines
364 B
Plaintext
module Case;
|
|
open import Stdlib.Prelude;
|
|
|
|
not' : Bool → Bool;
|
|
not' b := case b
|
|
| true := false
|
|
| false := true;
|
|
|
|
terminating
|
|
andList : List Bool → Bool;
|
|
andList l := case l
|
|
| nil := true
|
|
| x :: xs := x && andList xs;
|
|
|
|
main : IO;
|
|
main := printBoolLn (not' false)
|
|
>> printBoolLn (andList (true :: false :: nil));
|
|
end;
|