View Source Lens2 (Lens 2 v0.2.1)
Use this module for convenience.
A module that does that can...
... access all the lens-making functions from the Lens 1 package under the same names:
Lens.key/1, for example. SeeLens2.Lensesfor the complete list.... make lenses for
MapSetcontainers withLens.MapSetand lenses forBiMapandBiMultiMapwithLens.Bi. Those are aliases forLens2.Lenses.MapSetandLens2.Lenses.Bi.... traverse containers with lens-using functions like
Deeply.update. (SeeLens2.Deeply.)... define its own lens makers with
def_raw_makeranddefmaker. (SeeLens2.Makers.)
It also defines the types used in specs.
Summary
Types
A nested data structure described by a lens.
Conceptually, a set of pointers into specified locations in a container.
A value, but named differently so it's clear it's been updated by the application of some function.
The value at a place pointed to by a lens.
Functions
Provide standard imports and aliases.
Types
@type container() :: any()
A nested data structure described by a lens.
@type lens() :: Access.access_fun(container(), [value()])
Conceptually, a set of pointers into specified locations in a container.
@type updated_value() :: value()
A value, but named differently so it's clear it's been updated by the application of some function.
@type value() :: any()
The value at a place pointed to by a lens.
Functions
Provide standard imports and aliases.
See the top of this page for more.