Skip to main content
Module

x/rambda/index.d.ts>lens

Faster and smaller alternative to Ramda
Go to Latest
function lens
import { lens } from "https://deno.land/x/rambda@v7.0.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: T) => U
setter: (a: U, s: T) => V