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 is now more dumbed down.
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 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 is now more dumbed down.