slightly faster map implementation
see this comment: https://github.com/quantified-uncertainty/squiggle/pull/1047#issuecomment-1241805927
This commit is contained in:
parent
ecc82ba8f7
commit
4d1f76f80e
|
@ -33,16 +33,14 @@ module Internals = {
|
|||
eLambdaValue,
|
||||
reducer: ProjectReducerFnT.t,
|
||||
): ReducerInterface_InternalExpressionValue.t => {
|
||||
let mappedList = array->E.A.reduceReverse(list{}, (acc, elem) => {
|
||||
let newElem = Reducer_Expression_Lambda.doLambdaCall(
|
||||
Belt.Array.map(array, elem =>
|
||||
Reducer_Expression_Lambda.doLambdaCall(
|
||||
eLambdaValue,
|
||||
list{elem},
|
||||
(accessors: ProjectAccessorsT.t),
|
||||
(reducer: ProjectReducerFnT.t),
|
||||
)
|
||||
list{newElem, ...acc}
|
||||
})
|
||||
mappedList->Belt.List.toArray->Wrappers.evArray
|
||||
)->Wrappers.evArray
|
||||
}
|
||||
|
||||
let reduce = (
|
||||
|
|
Loading…
Reference in New Issue
Block a user