MCPcopy
hub / github.com/Effect-TS/effect / as

Function as

packages/typeclass/src/Covariant.ts:59–66  ·  view source on GitHub ↗
(F: Covariant<F>)

Source from the content-addressed store, hash-verified

57 * @since 0.24.0
58 */
59export const as = <F extends TypeLambda>(F: Covariant<F>): {
60 <B>(b: B): <R, O, E, _>(self: Kind<F, R, O, E, _>) => Kind<F, R, O, E, B>
61 <R, O, E, _, B>(self: Kind<F, R, O, E, _>, b: B): Kind<F, R, O, E, B>
62} =>
63 dual(
64 2,
65 <R, O, E, _, B>(self: Kind<F, R, O, E, _>, b: B): Kind<F, R, O, E, B> => F.map(self, () => b)
66 )
67
68/**
69 * @category mapping

Callers 11

Covariant.test.tsFile · 0.85
asVoidFunction · 0.85
Micro.tsFile · 0.85
allFunction · 0.85
forEachFunction · 0.85
filterMapFunction · 0.85
Option.tsFile · 0.85
asVoidFunction · 0.85
core.tsFile · 0.85
channel.tsFile · 0.85
stm.tsFile · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected