mirror of
https://github.com/anoma/juvix.git
synced 2025-01-07 08:08:44 +03:00
019579bba2
* Closes #2361 * Aligns `case` and `let`
24 lines
481 B
Plaintext
24 lines
481 B
Plaintext
-- Applications with lets and cases in function position
|
|
module test037;
|
|
|
|
import Stdlib.Prelude open;
|
|
|
|
f (l : List ((Nat → Nat) → Nat → Nat)) : Nat :=
|
|
case l of {
|
|
| x :: _ := x
|
|
| nil := id
|
|
}
|
|
(let
|
|
y : Nat → Nat := id;
|
|
in (let
|
|
z : (Nat → Nat) → Nat → Nat := id;
|
|
in case l of {
|
|
| _ :: _ := id
|
|
| _ := id
|
|
}
|
|
z)
|
|
y)
|
|
7;
|
|
|
|
main : IO := printNatLn (f (λ {| x y := x y + 2} :: nil));
|