import * as HKT from './HKT' export interface Zip extends HKT.Base { readonly zip_: ZipFn_ readonly zip: ZipFn readonly zipWith_: ZipWithFn_ readonly zipWith: ZipWithFn } export type ZipMin = { readonly zip_: ZipFn_ readonly zipWith_: ZipWithFn_ } export function Zip(F: ZipMin): Zip { return HKT.instance({ zip_: F.zip_, zip: (fb) => (fa) => F.zip_(fa, fb), zipWith_: F.zipWith_, zipWith: (fb, f) => (fa) => F.zipWith_(fa, fb, f) }) } export interface ZipFn { (fb: HKT.Kind): < N extends string, K, Q, W, X, I, S, R, E, A >( fa: HKT.Kind< F, C, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, A > ) => HKT.Kind< F, C, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, readonly [A, B] > } export interface ZipFn_ { ( fa: HKT.Kind, fb: HKT.Kind< F, C, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, B > ): HKT.Kind< F, C, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, readonly [A, B] > } export interface ZipWithFn { ( fb: HKT.Kind, f: (a: A, b: B) => C ): ( fa: HKT.Kind< F, TC, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, A > ) => HKT.Kind< F, TC, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, C > } export interface ZipWithFn_ { ( fa: HKT.Kind, fb: HKT.Kind< F, TC, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, HKT.Intro, B >, f: (a: A, b: B) => C ): HKT.Kind< F, TC, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, HKT.Mix, C > }