From 05b5efce1895304e1a2c165bb3b61105a8c777f5 Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Tue, 12 Apr 2022 16:15:27 +0200 Subject: [PATCH] remove -> in switch cases. close umuro/squiggle#59 squiggle --- .../Reducer_Expression/Reducer_Expression.res | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res index 6aeaa81d..ee1495d9 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res @@ -70,18 +70,18 @@ let rec reduceExpression = (expression: t, bindings: T.bindings): result expression->Ok | T.EBindings(_) => expression->Ok - | T.EList(list) => - list - ->Belt.List.reduceReverse(Ok(list{}), (racc, each: expression) => - racc->Result.flatMap(acc => { - each - ->replaceSymbols(bindings) - ->Result.flatMap(newNode => { - acc->Belt.List.add(newNode)->Ok + | T.EList(list) => { + let racc = list->Belt.List.reduceReverse(Ok(list{}), (racc, each: expression) => + racc->Result.flatMap(acc => { + each + ->replaceSymbols(bindings) + ->Result.flatMap(newNode => { + acc->Belt.List.add(newNode)->Ok + }) }) - }) - ) - ->Result.map(acc => acc->T.EList) + ) + racc->Result.map(acc => acc->T.EList) + } } let doBindStatement = (statement: t, bindings: T.bindings) => {