// tracing: off
import * as A from "../../Collections/Immutable/Array"
import { pipe } from "../../Function"
import { flattenTuples } from "./_internal/flattenTuples"
import { map } from "./map"
import { zip_ } from "./zip"
/**
 * Zips the specified streams together with the specified function.
 */

export function zipN(...[s1, s2, ...streams]) {
  return (f) => {
    return map((_) => f(...flattenTuples(_)))(A.reduce_(streams, zip_(s1, s2), zip_))
  }
}
//# sourceMappingURL=zipN.js.map
