diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res index c3d25799..71624f60 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res @@ -245,7 +245,7 @@ module DiminishingReturns = { optimalAllocations: array, currentMarginalReturns: result, errorValue>, } - let findBiggestElementIndex = xs => + let findBiggestElementIndex = (xs: array) => E.A.reducei(xs, 0, (acc, newElement, index) => { switch newElement > xs[acc] { | true => index diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res index b1eb6058..91fb3b1c 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res @@ -30,7 +30,7 @@ let rec toString = (expression: expression) => | EBlock(statements) => `{${Js.Array2.map(statements, aValue => toString(aValue))->commaJoin}}` | EProgram(statements) => `<${Js.Array2.map(statements, aValue => toString(aValue))->commaJoin}>` | EArray(aList) => `[${Js.Array2.map(aList, aValue => toString(aValue))->commaJoin}]` - | ERecord(map) => "TODO" + | ERecord(map) => `{${map->Belt.Array.map(((key, value)) => `${key->toString}: ${value->toString}`)->Js.Array2.toString}}` | ESymbol(name) => name | ETernary(predicate, trueCase, falseCase) => `${predicate->toString} ? (${trueCase->toString}) : (${falseCase->toString})`