MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeLens

Function makeLens

packages/effect/src/Optic.ts:177–179  ·  view source on GitHub ↗
(get: (s: S) => A, replace: (a: A, s: S) => S)

Source from the content-addressed store, hash-verified

175 * @since 4.0.0
176 */
177export function makeLens<S, A>(get: (s: S) => A, replace: (a: A, s: S) => S): Lens<S, A> {
178 return make(primitiveNode("Lens", get, replace))
179}
180
181/**
182 * Focuses on a part `A` of `S` that may not be present (e.g. a union

Callers 2

pickMethod · 0.85
omitMethod · 0.85

Calls 2

primitiveNodeFunction · 0.85
makeFunction · 0.70

Tested by

no test coverage detected