import type { Reducer } from "./api.js" ; import { reducer } from "./reduce.js" ; export function str ( sep ? ) ; export function str ( sep , xs ) ; export function str ( sep ? , xs ? ) { sep = sep || "" ; let first = true ; return xs ? [ ... xs ] . join ( sep ) : reducer < string , any > ( ( ) => "" , ( acc , x ) => ( ( acc = first ? acc + x : acc + sep + x ) , ( first = false ) , acc ) ) ; }