MCPcopy Index your code
hub / github.com/Effect-TS/effect / imap

Function imap

packages/typeclass/src/Covariant.ts:38–40  ·  view source on GitHub ↗
(
  map: <R, O, E, A, B>(self: Kind<F, R, O, E, A>, f: (a: A) => B) => Kind<F, R, O, E, B>
)

Source from the content-addressed store, hash-verified

36 * @since 0.24.0
37 */
38export const imap = <F extends TypeLambda>(
39 map: <R, O, E, A, B>(self: Kind<F, R, O, E, A>, f: (a: A) => B) => Kind<F, R, O, E, B>
40): Invariant<F>["imap"] => dual(3, (self, to, _) => map(self, to))
41
42/**
43 * @category mapping

Callers 2

Semigroup.test.tsFile · 0.50
Invariant.test.tsFile · 0.50

Calls 1

mapFunction · 0.70

Tested by

no test coverage detected