Skip to content

andThen

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

Defined in: Core/Lens.ts:97

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>

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