Skip to content

modify

modify<S, A>(lens): (f) => (s) => S

Defined in: Core/Lens.ts:89

Applies a function to the focused value, returning a new structure.

S

A

Lens<S, A>

(f): (s) => S

(a) => A

(s): S

S

S

pipe(user, Lens.modify(nameLens)(n => n.toUpperCase())); // "ALICE"