Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/optics.ts>atKey

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function atKey
import { atKey } from "https://deno.land/x/fun@v2.0.0-alpha.6/optics.ts";

Given an optic over a record, focus on an Option(value) at the given key, allowing one to delete the key by modifying with a None value.

TODO: Clean this implementation up.

Parameters

key: string

Returns

<U extends Tag, S, A>(first: Optic<U, S, Readonly<Record<string, A>>>) => Optic<Align<U, GetTag>, S, Option<A>>