1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-07 08:08:44 +03:00
juvix/tests/Compilation/positive/test057.juvix
Łukasz Czajka 2baad15a41 Remove old function syntax (#2305)
* Enables new function syntax in local let-declarations
* Closes #2251
2023-08-24 16:24:47 +02:00

14 lines
262 B
Plaintext

-- case folding
module test057;
import Stdlib.Prelude open;
myfun : {A : Type} -> (A -> A -> A) -> A -> List A -> A
| f x xs :=
case x :: xs
| nil := x
| y :: nil := y
| y :: z :: _ := f y z;
main : Nat := myfun (+) 1 (7 :: 3 :: nil);