Skip to content

set

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

Defined in: Core/Lens.ts:70

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

S

A

Lens<S, A>

(a) => (s) => S

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