mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 14:28:08 +03:00
16 lines
320 B
Plaintext
16 lines
320 B
Plaintext
|
-- 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);
|