LanguageExt.Core

LanguageExt.Core Lens

Contents

class Lens Source #

Methods

method Lens<(A, B), (C, D)> tuple <A, B, C, D> (Lens<A, C> First, Lens<B, D> Second) Source #

Pair two lenses

method Lens<(A, B, C), (D, E, F)> tuple <A, B, C, D, E, F> (Lens<A, D> First, Lens<B, E> Second, Lens<C, F> Third) Source #

Triple three lenses

method Lens<A, B> cond <A, B> (Func<A, bool> pred, Lens<A, B> Then, Lens<A, B> Else) Source #

is applied to source. If true, is selected. If false, is selected.

method Lens<(A, B), A> fst <A, B> () Source #

Gets/sets the fst element in a pair

method Lens<(A, B, C), A> fst <A, B, C> () Source #

Gets/sets the fst element in a triple

method Lens<(A, B, C, D), A> fst <A, B, C, D> () Source #

Gets/sets the fst element in a quad

method Lens<(A, B), B> snd <A, B> () Source #

Gets/sets the snd element in a pair

method Lens<(A, B, C), B> snd <A, B, C> () Source #

Gets/sets the snd element in a pair

method Lens<(A, B, C, D), B> snd <A, B, C, D> () Source #

Gets/sets the snd element in a pair

method Lens<(A, B, C), C> thrd <A, B, C> () Source #

Gets/sets the thrd element in a pair

method Lens<(A, B, C, D), C> thrd <A, B, C, D> () Source #

Gets/sets the thrd element in a pair

method Lens<A, A> identity <A> () Source #

Identity lens

method Lens<IEnumerable<A>, IEnumerable<B>> enumMap <A, B> (Lens<A, B> la) Source #

Creates a lens that maps the given lens in an enumerable

method Prism<A, B> ToPrism <A, B> (this Lens<A, B> la) Source #

Convert a Lens<A,B> to a Prism<A,B>

method Prism<A, B> ToPrism <A, B> (this Lens<A, Option<B>> la) Source #

Convert a Lens<A, Option> to a Prism<A,B>

struct Lens <A, B> Source #

Primitive lens type for creating well-behaved bidirectional transformations

Fields

field Func<A, B> Get Source #

field Func<B, Func<A, A>> SetF Source #

Methods

method A Set (B value, A cont) Source #

method Lens<A, B> New (Func<A, B> Get, Func<B, Func<A, A>> Set) Source #

method Func<A, A> Update (Func<B, B> f) Source #

method A Update (Func<B, B> f, A value) Source #

class Prelude Source #

Methods

method Lens<A, C> lens <A, B, C> (Lens<A, B> la, Lens<B, C> lb) Source #

Sequentially composes two lenses

method Lens<A, D> lens <A, B, C, D> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc) Source #

Sequentially composes three lenses

method Lens<A, E> lens <A, B, C, D, E> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld) Source #

Sequentially composes four lenses

method Lens<A, F> lens <A, B, C, D, E, F> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld, Lens<E, F> le) Source #

Sequentially composes five lenses

method Lens<A, G> lens <A, B, C, D, E, F, G> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld, Lens<E, F> le, Lens<F, G> lf) Source #

Sequentially composes six lenses

method Lens<A, H> lens <A, B, C, D, E, F, G, H> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld, Lens<E, F> le, Lens<F, G> lf, Lens<G, H> lg) Source #

Sequentially composes seven lenses

method Lens<A, I> lens <A, B, C, D, E, F, G, H, I> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld, Lens<E, F> le, Lens<F, G> lf, Lens<G, H> lg, Lens<H, I> lh) Source #

Sequentially composes eight lenses

method Lens<A, J> lens <A, B, C, D, E, F, G, H, I, J> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld, Lens<E, F> le, Lens<F, G> lf, Lens<G, H> lg, Lens<H, I> lh, Lens<I, J> li) Source #

Sequentially composes nine lenses

method Lens<A, K> lens <A, B, C, D, E, F, G, H, I, J, K> (Lens<A, B> la, Lens<B, C> lb, Lens<C, D> lc, Lens<D, E> ld, Lens<E, F> le, Lens<F, G> lf, Lens<G, H> lg, Lens<H, I> lh, Lens<I, J> li, Lens<J, K> lj) Source #

Sequentially composes ten lenses