Fixed the linting of reducer files

This commit is contained in:
Ozzie Gooen 2022-04-23 12:25:33 -04:00
parent d6e4f77624
commit 21975f2c0b
5 changed files with 12 additions and 5 deletions

View File

@ -9,3 +9,4 @@ packages/website/.docusaurus
packages/squiggle-lang/lib
packages/squiggle-lang/.nyc_output/
packages/squiggle-lang/coverage/
packages/squiggle-lang/.cache/

View File

@ -4,3 +4,4 @@ lib
*.gen.tsx
.nyc_output/
coverage/
.cache/

View File

@ -17,7 +17,10 @@ let expectEvalToBe = (expr: string, answer: string) =>
Reducer.evaluate(expr)->ExpressionValue.toStringResult->expect->toBe(answer)
let expectEvalBindingsToBe = (expr: string, bindings: Reducer.externalBindings, answer: string) =>
Reducer.evaluateUsingExternalBindings(expr, bindings)->ExpressionValue.toStringResult->expect->toBe(answer)
Reducer.evaluateUsingExternalBindings(expr, bindings)
->ExpressionValue.toStringResult
->expect
->toBe(answer)
let expectEvalPartialBindingsToBe = (
expr: string,

View File

@ -136,7 +136,9 @@ let evalPartialUsingExternalBindings_ = (codeText: string, bindings: T.bindings)
Therefore all statments are assignments.
*/
let evalOuterWBindings_ = (codeText: string, bindings: T.bindings) => {
parseOuter(codeText)->Result.flatMap(expression => expression->evalUsingExternalBindingsExpression_(bindings))
parseOuter(codeText)->Result.flatMap(expression =>
expression->evalUsingExternalBindingsExpression_(bindings)
)
}
/*