Skip to main content
Module

x/fae/lensPath.ts>lensPath

A functional module for Deno inspired from Ramda.
Latest
variable lensPath
import { lensPath } from "https://deno.land/x/fae@v1.1.1/lensPath.ts";

Returns a lens whose focus is the specified path.

 const xHeadYLens = Fae.lensPath(['x', 0, 'y'])
 Fae.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}) // {x: [{y: 1, z: 3}, {y: 4, z: 5}]}

type

LensPath