Skip to content

set

set<S, A>(lens): (a) => (s) => S

Defined in: Core/Lens.ts:79

Replaces the focused value within a structure, returning a new structure.

S

A

Lens<S, A>

(a): (s) => S

A

(s): S

S

S

pipe(user, Lens.set(nameLens)("Bob")); // new User with name "Bob"