1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 14:28:08 +03:00
juvix/tests/Rust/Compilation/positive/test059.juvix

16 lines
320 B
Plaintext
Raw Normal View History

-- builtin list
module test059;
import Stdlib.Prelude open hiding {head};
mylist : List Nat := [1; 2; 3 + 1];
mylist2 : List (List Nat) := [[10]; [2]; 3 + 1 :: nil];
head : {a : Type} -> a -> List a -> a
| a [] := a
| a [x; _] := x
| _ (h :: _) := h;
main : Nat := head 50 mylist + head 50 (head [] mylist2);