mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 14:13:27 +03:00
b609e1f6a5
* Closes #3002
19 lines
303 B
Plaintext
19 lines
303 B
Plaintext
-- Non-duplication in let-folding
|
|
module test081;
|
|
|
|
import Stdlib.Prelude open;
|
|
|
|
{-# inline: false #-}
|
|
g (h : Nat -> Nat) : Nat := h 0 * h 0;
|
|
|
|
terminating
|
|
f (n : Nat) : Nat :=
|
|
if
|
|
| n == 0 := 0
|
|
| else :=
|
|
let terminating x := f (sub n 1)
|
|
in
|
|
g \{_ := x};
|
|
|
|
main : Nat := f 10000;
|