diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-25 15:12:12 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-25 15:12:12 +0000 |
| commit | 7d1944ab9d2307f2736afe8520436872db1c7617 (patch) | |
| tree | 7380a4f148f9ce0b70ed9f02cfa5e8561c783a7a /tests/functions/test_lambda_arrow.zc | |
| parent | 8b720543f538862796fec0ff6b7ea12cb140bf0f (diff) | |
'let' it be
Diffstat (limited to 'tests/functions/test_lambda_arrow.zc')
| -rw-r--r-- | tests/functions/test_lambda_arrow.zc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/functions/test_lambda_arrow.zc b/tests/functions/test_lambda_arrow.zc index 111487d..b4c8edc 100644 --- a/tests/functions/test_lambda_arrow.zc +++ b/tests/functions/test_lambda_arrow.zc @@ -4,24 +4,24 @@ fn compute(op: fn(I32, I32) -> I32, a: I32, b: I32) -> I32 { } test "test_lambda_arrow" { - var doubler = x -> x * 2; - var res1 = doubler(5); + let doubler = x -> x * 2; + let res1 = doubler(5); "doubler(5) = {res1}"; if res1 != 10 { exit(1); } - var add = (x, y) -> x + y; - var res2 = add(10, 20); + let add = (x, y) -> x + y; + let res2 = add(10, 20); "add(10, 20) = {res2}"; if res2 != 30 { exit(1); } - var res3 = compute((a, b) -> a * b, 3, 4); + let res3 = compute((a, b) -> a * b, 3, 4); "compute((a, b) -> a * b, 3, 4) = {res3}"; if res3 != 12 { exit(1); } } test "lambda_inference_repro" { - var dble = x -> x * 2.0; - var res = dble(9.0); + let dble = x -> x * 2.0; + let res = dble(9.0); if res != 18.0 { exit(1); } |
