import type { Reducer } from "./api.js" ; import { reducer } from "./reduce.js" ; export function push < T > ( ) ; export function push < T > ( xs ) ; export function push < T > ( xs ? ) { return xs ? [ ... xs ] : reducer < T [ ] , T > ( ( ) => [ ] , ( acc , x ) => ( acc . push ( x ) , acc ) ) ; }