1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
juvix/tests/positive/NestedPatterns.juvix

15 lines
274 B
Plaintext
Raw Normal View History

module NestedPatterns;
import Stdlib.Prelude open;
type MyList (A : Type) := myList : List A -> MyList A;
toList : {A : Type} -> MyList A -> List A
| (myList xs) := xs;
f : MyList Nat -> Nat
| xs :=
case toList xs of
| suc n :: nil := n
| _ := zero;