import * as binaryen from "./wasm-encoder.js"; /** * Generate array_map(arrPtr: i32, closurePtr: i32) → i32 * * Allocates a new array, maps each element through the closure, returns result ptr. */ export declare function generateArrayMap(mod: binaryen.Module): void; /** * Generate array_filter(arrPtr: i32, closurePtr: i32) → i32 * * Single-pass overalloc: allocates max-length result, filters in one pass, * then writes actual count. Tail waste is acceptable (arena allocator). */ export declare function generateArrayFilter(mod: binaryen.Module): void; /** * Generate array_reduce(arrPtr: i32, init: i32, closurePtr: i32) → i32 * * Folds array elements into an accumulator via the closure. */ export declare function generateArrayReduce(mod: binaryen.Module): void; /** * Generate array_find(arrPtr: i32, closurePtr: i32) → i32 * * Scans array, calls predicate on each element. Returns Option: * - Some(elem): heap-allocated [tag=1][pad(4)][value][pad(4)] * - None: heap-allocated [tag=0][pad(4)] * * Option layout matches the built-in enum: None=tag0/8 bytes, Some=tag1/16 bytes. */ export declare function generateArrayFind(mod: binaryen.Module): void; /** * Generate array_sort(arrPtr: i32, closurePtr: i32) → i32 * * Copies the input array to a new heap allocation, then sorts in-place * using insertion sort. The comparator closure returns: * negative if a < b, 0 if a == b, positive if a > b (C qsort convention). */ export declare function generateArraySort(mod: binaryen.Module): void; //# sourceMappingURL=hof-generators.d.ts.map