Class: Setter

Setter

new Setter(map, options) → {Lens}

A Setter is a Lens that only supports setting and mapping. A Setter is constructed with a single function (map).

Parameters:
Name Type Description
map function

Function that maps over the view of the Lens and returns the result.

options object

Additional flags to set in the Lens.

Returns:
Type
Lens

Methods

<static> fromLens(lens) → {Lens}

Get a Setter from a Lens

Parameters:
Name Type Description
lens Lens

The Lens to convert to a Setter

Returns:
Type
Lens