Skip to content

andThen

andThen<A, B>(inner): <S>(outer) => Lens<S, B>

Defined in: Core/Lens.ts:104

Composes two Lenses: focuses through the outer, then through the inner. Use in a pipe chain to build up a deep focus step by step.

A

B

Lens<A, B>

<S>(outer): Lens<S, B>

S

Lens<S, A>

Lens<S, B>

const userCityLens = pipe(
  Lens.prop<User>()("address"),
  Lens.andThen(Lens.prop<Address>()("city")),
);