format rescritp

This commit is contained in:
Umur Ozkul 2022-09-04 21:52:48 +02:00
parent 247e101324
commit b73924135f
2 changed files with 14 additions and 3 deletions

View File

@ -67,9 +67,15 @@ describe("FunctionRegistry Library", () => {
testEvalToBe("SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5])", "Ok(Sample Set Distribution)")
testEvalToBe("SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5])", "Ok(Sample Set Distribution)")
testEvalToBe("SampleSet.fromFn({|| sample(normal(5,2))})", "Ok(Sample Set Distribution)")
testEvalToBe("SampleSet.min(SampleSet.fromDist(normal(50,2)), 2)", "Ok(Sample Set Distribution)")
testEvalToBe(
"SampleSet.min(SampleSet.fromDist(normal(50,2)), 2)",
"Ok(Sample Set Distribution)",
)
testEvalToBe("mean(SampleSet.min(SampleSet.fromDist(normal(50,2)), 2))", "Ok(2)")
testEvalToBe("SampleSet.max(SampleSet.fromDist(normal(50,2)), 10)", "Ok(Sample Set Distribution)")
testEvalToBe(
"SampleSet.max(SampleSet.fromDist(normal(50,2)), 10)",
"Ok(Sample Set Distribution)",
)
testEvalToBe(
"addOne(t)=t+1; SampleSet.toList(SampleSet.map(SampleSet.fromList([1,2,3,4,5,6]), addOne))",
"Ok([2,3,4,5,6,7])",

View File

@ -256,6 +256,11 @@ module Private = {
let these = project->getStdLib
let ofUser = Continuation.minus(those, these)
(getResultOption(project, "main")->Belt.Option.getWithDefault(InternalExpressionValue.IEvVoid->Ok), ofUser)
(
getResultOption(project, "main")->Belt.Option.getWithDefault(
InternalExpressionValue.IEvVoid->Ok,
),
ofUser,
)
}
}