Skip to main content
Module

x/fae/over.ts>over

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

Returns the result of "setting" the portion of the given data structure target focused by the given lens to the result of applying the given function fn to the focused value.

 const headLens = Fae.lensIndex(0)
 Fae.over(headLens, (x: string) => x.toUpperCase(), ['foo', 'bar', 'baz']) // ['FOO', 'bar', 'baz']

type

Over