Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/index.d.ts>lens

Faster and smaller alternative to Ramda
Latest
function lens
import { lens } from "https://deno.land/x/rambda@9.4.1/index.d.ts";

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