ERecord->toString, fix warning
This commit is contained in:
parent
f62e90fa98
commit
89397d3584
|
@ -245,7 +245,7 @@ module DiminishingReturns = {
|
|||
optimalAllocations: array<float>,
|
||||
currentMarginalReturns: result<array<float>, errorValue>,
|
||||
}
|
||||
let findBiggestElementIndex = xs =>
|
||||
let findBiggestElementIndex = (xs: array<float>) =>
|
||||
E.A.reducei(xs, 0, (acc, newElement, index) => {
|
||||
switch newElement > xs[acc] {
|
||||
| true => index
|
||||
|
|
|
@ -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})`
|
||||
|
|
Loading…
Reference in New Issue
Block a user