import type * as P from "@principia/prelude";
import type { Separated } from "@principia/prelude/Utils";
import type { Either } from "../Either";
import type { Predicate, PredicateWithIndex, Refinement, RefinementWithIndex } from "../Function";
import type { Option } from "../Option";
import type { URI, V } from "./model";
/**
* ```haskell
* filterWithIndex_ :: (FilterableWithIndex f, Index k) =>
* (f a, ((k, a) -> Boolean)) -> f a
* ```
*
* @category FilterableWithIndex
* @since 1.0.0
*/
export declare const filterWithIndex_: {
(fa: ReadonlyArray, f: RefinementWithIndex): ReadonlyArray;
(fa: ReadonlyArray, f: PredicateWithIndex): ReadonlyArray;
};
/**
* ```haskell
* filterWithIndex :: (FilterableWithIndex f, Index k) =>
* ((k, a) -> Boolean) -> f a -> f a
* ```
*
* @category FilterableWithIndex
* @since 1.0.0
*/
export declare const filterWithIndex: {
(f: RefinementWithIndex): (fa: ReadonlyArray) => ReadonlyArray;
(f: PredicateWithIndex): (fa: ReadonlyArray) => ReadonlyArray;
};
/**
* ```haskell
* filter_ :: Filterable f => (f a, (a -> Boolean)) -> f a
* ```
*
* @category Filterable
* @since 1.0.0
*/
export declare const filter_: {
(fa: ReadonlyArray, f: Refinement): ReadonlyArray;
(fa: ReadonlyArray, f: Predicate): ReadonlyArray;
};
/**
* ```haskell
* filter :: Filterable f => (a -> Boolean) -> f a -> f a
* ```
*
* @category Filterable
* @since 1.0.0
*/
export declare const filter: {
(f: Refinement): (fa: ReadonlyArray) => ReadonlyArray;
(f: Predicate): (fa: ReadonlyArray) => ReadonlyArray;
};
/**
* ```haskell
* mapOptionWithIndex_ :: (FilterableWithIndex f, Index k) =>
* (f a, ((k, a) -> Option b)) -> f k b
* ```
*
* @category FilterableWithIndex
* @since 1.0.0
*/
export declare const mapOptionWithIndex_: (fa: readonly A[], f: (i: number, a: A) => Option) => readonly B[];
/**
* ```haskell
* mapOptionWithIndex :: (FilterableWithIndex f, Index k) =>
* ((k, a) -> Option b) -> f a -> f k b
* ```
*
* @category FilterableWithIndex
* @since 1.0.0
*/
export declare const mapOptionWithIndex: (
f: (i: number, a: A) => Option
) => (fa: readonly A[]) => readonly B[];
/**
* ```haskell
* mapOption_ :: Filterable f => (f a, (a -> Option b)) -> f b
* ```
*
* @category Filterable
* @since 1.0.0
*/
export declare const mapOption_: (fa: readonly A[], f: (a: A) => Option) => readonly B[];
/**
* ```haskell
* mapOption :: Filterable f => (a -> Option b) -> f a -> f b
* ```
*
* @category Filterable
* @since 1.0.0
*/
export declare const mapOption: (f: (a: A) => Option) => (fa: readonly A[]) => readonly B[];
/**
* ```haskell
* partitionWithIndex_ :: (FilterableWithIndex f, Index k) =>
* (f a, ((k, a) -> Boolean)) -> Separated (f a) (f a)
* ```
*/
export declare const partitionWithIndex_: {
(ta: ReadonlyArray, refinement: RefinementWithIndex): Separated<
ReadonlyArray,
ReadonlyArray
>;
(ta: ReadonlyArray, predicate: PredicateWithIndex): Separated, ReadonlyArray>;
};
/**
* ```haskell
* partitionWithIndex :: (FilterableWithIndex f, Index k) =>
* ((k, a) -> Boolean) -> f a -> Separated (f a) (f a)
* ```
*/
export declare const partitionWithIndex: {
(refinement: RefinementWithIndex): (
ta: ReadonlyArray
) => Separated, ReadonlyArray>;
(predicate: PredicateWithIndex): (
ta: ReadonlyArray
) => Separated, ReadonlyArray>;
};
/**
* ```haskell
* partition_ :: Filterable f => (f a, (a -> Boolean)) -> Separated (f a) (f a)
* ```
*/
export declare const partition_: {
(ta: ReadonlyArray, refinement: Refinement): Separated, ReadonlyArray>;
(ta: ReadonlyArray, predicate: Predicate): Separated, ReadonlyArray>;
};
/**
* ```haskell
* partition :: Filterable f => (a -> Boolean) -> f a -> Separated (f a) (f a)
* ```
*/
export declare const partition: {
(refinement: Refinement): (
ta: ReadonlyArray
) => Separated, ReadonlyArray>;
(predicate: Predicate): (ta: ReadonlyArray) => Separated, ReadonlyArray>;
};
/**
* ```haskell
* mapEitherWithIndex_ :: (FilterableWithIndex f, Index k) =>
* (f a, ((k, a) -> Either b c)) -> Separated (f b) (f c)
* ```
*/
export declare const mapEitherWithIndex_: (
ta: readonly A[],
f: (i: number, a: A) => Either
) => Separated;
/**
* ```haskell
* mapEitherWithIndex :: (FilterableWithIndex f, Index k) =>
* ((k, a) -> Either b c) -> f a -> Separated (f b) (f c)
* ```
*/
export declare const mapEitherWithIndex: (
f: (i: number, a: A) => Either
) => (ta: readonly A[]) => Separated;
/**
* ```haskell
* mapEither_ :: Filterable f => (f a, (a -> Either b c)) -> Separated (f b) (f c)
* ```
*/
export declare const mapEither_: (
ta: readonly A[],
f: (a: A) => Either
) => Separated;
/**
* ```haskell
* mapEither :: Filterable f => (a -> Either b c) -> f a -> Separated (f b) (f c)
* ```
*/
export declare const mapEither: (
f: (a: A) => Either
) => (ta: readonly A[]) => Separated;
export declare const Filterable: P.Filterable<[URI], V>;
export declare const FilterableWithIndex: P.FilterableWithIndex<[URI], V>;
//# sourceMappingURL=filterable.d.ts.map