1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
juvix/tests/Compilation/positive/test031.juvix
Paul Cadman b8cd84170b
Update juvix-stdlib to remove non-ASCII indentifiers (#2857)
This PR updates the juvix-stdlib to the current main commit which
includes:

* https://github.com/anoma/juvix-stdlib/issues/59
* https://github.com/anoma/juvix-stdlib/issues/101

All the Juvix test suite files and examples in this repo have been
updated to be compatible with the new stdlib.
2024-06-26 10:23:35 +02:00

20 lines
422 B
Plaintext

-- nested lists
module test031;
import Stdlib.Prelude open;
mklst : Nat → List Nat
| zero := nil
| (suc n) := suc n :: mklst n;
mklst2 : Nat → List (List Nat)
| zero := nil
| (suc n) := mklst (suc n) :: mklst2 n;
printListNatLn : List Nat → IO
| nil := printStringLn "nil"
| (x :: xs) :=
printNat x >>> printString " :: " >>> printListNatLn xs;
main : IO := printListNatLn (flatten (mklst2 4));