import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/es6/HKT' import { MonadIO, MonadIO1, MonadIO2, MonadIO2C, MonadIO3 } from 'fp-ts/es6/MonadIO' /** * Mimics the analogous Unix command: given an action `HKT`, we can derive an action `HKT` that * returns the elapsed time along with the computed value * * @example * import { io } from 'fp-ts/IO' * import { randomInt } from 'fp-ts/Random' * import { time } from 'fp-ts-contrib/time' * * const timeIO = time(io) * * function fib(n: number): number { * return n <= 1 ? 1 : fib(n - 1) + fib(n - 2) * } * * timeIO(io.map(randomInt(30, 35), fib))() // [ 14930352, 127 ] * * @since 0.1.0 */ export declare function time( M: MonadIO3 ): (ma: Kind3) => Kind3 export declare function time(M: MonadIO2): (ma: Kind2) => Kind2 export declare function time( M: MonadIO2C ): (ma: Kind2) => Kind2 export declare function time(M: MonadIO1): (ma: Kind) => Kind export declare function time(M: MonadIO): (ma: HKT) => HKT