Skip to main content
Module

x/fun/optics.ts>prop

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 prop
import { prop } from "https://deno.land/x/fun@v2.0.0-alpha.6/optics.ts";

Given an Optic over a structure with a property P, construct a new Optic at that property P.

Type Parameters

A
P extends keyof A

Returns

<U extends Tag, S>(sa: Optic<U, S, A>) => Optic<Align<U, GetTag>, S, A[P]>