Module

x/rambda/rambda.js>lens

Faster and smaller alternative to Ramda
Latest
function lens
import { lens } from "https://dotland.deno.dev/x/rambda@9.4.1/rambda.js";

It returns a lens for the given getter and setter functions.

The getter gets the value of the focus; the setter sets the value of the focus.

The setter should not mutate the data structure.

Parameters

getter: (s: S) => A
setter: (a: A, s: S) => S