import { Applicative, Applicative1, Applicative2, Applicative2C, Applicative3 } from 'fp-ts/lib/Applicative'; import { Foldable, Foldable1, Foldable2 } from 'fp-ts/lib/Foldable'; import { Predicate } from 'fp-ts/lib/function'; import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT'; export * from 'fp-ts/lib/Foldable'; /** * `and` returns the _conjunction_ of all the `boolean` values in a data * structure. This function will test whether all of the values in a data * structure are `true`. * * @param F Foldable instance * @param bs A foldable container of one or more `boolean`s * * @example * and(remoteData)(initial) //-> true * and(remoteData)(pending) //-> true * and(remoteData)(failure("Oops!")) //-> true * and(remoteData)(failure(true)) //-> true * and(remoteData)(success(false)) //-> false * and(remoteData)(success(true)) //-> true * * and(option)(none) //-> true * and(option)(some(false)) //-> false * and(option)(some(true)) //-> true * * and(array)([false,false,false]) //-> false * and(array)([true,false,false]) //-> false * and(array)([]) //-> true * and(array)([true]) //-> true */ export declare function and(F: Foldable2): (bs: Kind2) => boolean; export declare function and(F: Foldable1): (bs: Kind) => boolean; /** * `or` returns the _disjunction_ of a data structure containing one or more * `boolean`s. This function will test whether any of the values in a data * structure is `true`. * * @param F Foldable instance * @param bs A foldable container of one or more `boolean`s * * @example * or(remoteData)(initial) //-> false * or(remoteData)(pending) //-> false * or(remoteData)(failure("Oops!")) //-> false * or(remoteData)(failure(true)) //-> false * or(remoteData)(success(false)) //-> false * or(remoteData)(success(true)) //-> true * * or(option)(none) //-> false * or(option)(some(false)) //-> false * or(option)(some(true)) //-> true * * or(array)([false,false,false]) //-> false * or(array)([true,false,false]) //-> true * or(array)([]) //-> false * or(array)([true]) //-> true */ export declare function or(F: Foldable2): (bs: Kind2) => boolean; export declare function or(F: Foldable1): (bs: Kind) => boolean; /** * Tests whether _all_ elements of a data structure satisfy a predicate. * * @param F Foldable instance * @param pred Predicate on type `A` * @param as A foldable container of one or more values of type `A` * */ export declare function all(F: Foldable2): (pred: Predicate, as: Kind2) => boolean; export declare function all(F: Foldable1): (pred: Predicate, as: Kind) => boolean; /** * Tests whether _any_ element of a data structure satisfies a predicate. * * @param F Foldable instance * @param pred Predicate on type `A` * @param as A foldable container of one or more values of type `A` * */ export declare function any(F: Foldable2): (pred: Predicate, as: Kind2) => boolean; export declare function any(F: Foldable1): (pred: Predicate, as: Kind) => boolean; /** * Counts the number of items that match a predicate in the provided foldable * @param F the Foldable instance * @param pred Predicate on type `A` * @param as A foldable container of one or more values of type `A` */ export declare function count(F: Foldable2): (pred: Predicate) => (as: Kind2) => number; export declare function count(F: Foldable1): (pred: Predicate) => (as: Kind) => number; /** /** * Sequence a data structure, performing some effects encoded by an `Applicative` functor at each value, ignoring the * final result. * * @since 2.0.0 */ export declare function sequence_(M: Applicative3, F: Foldable1): (fa: Kind>) => Kind3; export declare function sequence_(M: Applicative2, F: Foldable1): (fa: Kind>) => Kind2; export declare function sequence_(M: Applicative2C, F: Foldable1): (fa: Kind>) => Kind2; export declare function sequence_(M: Applicative1, F: Foldable1): (fa: Kind>) => Kind; export declare function sequence_(M: Applicative, F: Foldable): (fa: HKT>) => HKT;