vectorizeIndexHOF(add2_fromindex_HOF, arrC, arrA, arrB) vectorizeIndexHOF(poly4_fromindex_HOF, arrE, arrA, arrB, arrC, arrD) vectorizeIndexHOF(add5_fromindex_HOF, arr, arrA, arrB, arrC, arrD, arrE)
Issue
the original code's type annotations causes deno_v1.35.3 to crash due to out-of-memory.
this did not happen back in deno_v1.32.1, so I'll leave the original code below.
but the actual source code has been dumbed down in order to prevent deno LSP from crashing.
exportconstvectorizeIndexHOF = < ParamLengthextendsnumber, AextendsNumericArray = any >( index_map_func_hof: IndexNumericMapFunc<ParamLength>, write_to: A, ...input_arrs: ArrayFixedLength<NumericArray, ParamLength> ): void=> { constmap_func_index = index_map_func_hof(...input_arrs) for (leti = 0; i < write_to.length; i++) write_to[i] = map_func_index(i) }
TODO: needs better documentation.
Example
Issue
the original code's type annotations causes
deno_v1.35.3
to crash due to out-of-memory.this did not happen back in
deno_v1.32.1
, so I'll leave the original code below. but the actual source code has been dumbed down in order to prevent deno LSP from crashing.