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

Function f

packages/typeclass/test/FlatMap.test.ts:26–26  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

24 it("composeK", () => {
25 const composeK = _.composeK(OptionInstances.FlatMap)
26 const f = (s: string): O.Option<number> => s.length > 0 ? O.some(s.length) : O.none()
27 const g = (n: number): O.Option<number> => n > 1 ? O.some(n) : O.none()
28 const h = pipe(f, composeK(g))
29 U.deepStrictEqual(h(""), O.none())

Callers 15

zipWithFunction · 0.50
apFunction · 0.50
flapFunction · 0.50
let_Function · 0.50
tapFunction · 0.50
bindFunction · 0.50
toArrayMapFunction · 0.50
combineMapFunction · 0.50
reduceKindFunction · 0.50
coproductMapKindFunction · 0.50
partitionMapCompositionFunction · 0.50
traverseTapFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected