From 75c913fac3d5467f43eae459a066cbdbfa1e34bc Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Thu, 19 May 2022 20:45:15 +0200 Subject: [PATCH] fixes #522 --- .../Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res index fea5a5cd..9df108f5 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res @@ -80,6 +80,7 @@ describe("Peggy to Expression", () => { (), ) // Function definitions become lambda assignments testToExpression("identity(x)", "(:$$block (:identity :x))", ()) // Note value returns error properly + testToExpression("f(x) = x> 2 ? 0 : 1; f(3)", "(:$$block (:$let :f (:$$lambda [x] (:$$block (:$$ternary (:larger :x 2) 0 1)))) (:f 3))", ~v="0", ()) }) describe("arrays", () => { @@ -183,6 +184,7 @@ describe("Peggy to Expression", () => { ~v="{x: 1,y: 99}", (), ) + }) describe("lambda", () => {