import type { IGen } from "./api.js" ; import { MapG2 , MapG3 } from "./mapg.js" ; /**
 * Higher order gen. Returns a  MapG2 or  MapG3 yielding
 * stepwise (non-accumulated) sums of given  IGen s. Initializes
 * to 0.
 *
 *  param a param b export function sum ( a , b ) ; export function sum ( a , b , c ) ; export function sum ( a , b , c ? ) { return c ? new MapG3 ( ( a , b , c ) => a + b + c , a , b , c , 0 ) : new MapG2 ( ( a , b ) => a + b , a , b , 0 ) ; }