import type * as P from "@principia/prelude";
import type { URI, V } from "./model";
export declare const chainWithIndex_: (
fa: ReadonlyArray,
f: (i: number, a: A) => ReadonlyArray
) => ReadonlyArray;
export declare const chainWithIndex: (
f: (i: number, a: A) => ReadonlyArray
) => (fa: ReadonlyArray) => ReadonlyArray;
/**
* ```haskell
* chain_ :: Monad m => (m a, (a -> m b)) -> m b
* ```
*
* Composes computations in sequence, using the return value of one computation as input for the next
*
* @category Monad
* @since 1.0.0
*/
export declare const chain_: (fa: readonly A[], f: (a: A) => readonly B[]) => readonly B[];
/**
* ```haskell
* chain :: Monad m => (a -> m b) -> m a -> m b
* ```
*
* Composes computations in sequence, using the return value of one computation as input for the next
*
* @category Monad
* @since 1.0.0
*/
export declare const chain: (f: (a: A) => readonly B[]) => (fa: readonly A[]) => readonly B[];
/**
* ```haskell
* flatten :: Monad m => m m a -> m a
* ```
*
* Removes one level of nesting from a nested `NonEmptyArray`
*
* @category Monad
* @since 1.0.0
*/
export declare const flatten: (mma: readonly (readonly A[])[]) => readonly A[];
/**
* ```haskell
* tap_ :: Monad m => (ma, (a -> m b)) -> m a
* ```
*
* Composes computations in sequence, using the return value of one computation as input for the next
* and keeping only the result of the first
*
* @category Monad
* @since 1.0.0
*/
export declare const tap_: (ma: readonly A[], f: (a: A) => readonly B[]) => readonly A[];
/**
* ```haskell
* tap :: Monad m => (a -> mb) -> m a -> m a
* ```
*
* Composes computations in sequence, using the return value of one computation as input for the next
* and keeping only the result of the first
*
* @category Monad
* @since 1.0.0
*/
export declare const tap: (f: (a: A) => readonly B[]) => (ma: readonly A[]) => readonly A[];
export declare const chainFirst: (f: (a: A) => readonly B[]) => (ma: readonly A[]) => readonly A[];
export declare const Monad: P.Monad<[URI], V>;
//# sourceMappingURL=monad.d.ts.map