Header menu logo Nu

LensOperators Module

Lens operators.

Functions and values

Function or value Description

computed lens get setOpt

Full Usage: computed lens get setOpt

Parameters:
    lens : Lens<'a, 's>
    get : 't -> World -> 'a
    setOpt : ('a -> 't -> World -> unit) option

Returns: PropertyDefinition

Define a computed property.

lens : Lens<'a, 's>
get : 't -> World -> 'a
setOpt : ('a -> 't -> World -> unit) option
Returns: PropertyDefinition

define lens value

Full Usage: define lens value

Parameters:
    lens : Lens<'a, 's>
    value : 'a

Returns: PropertyDefinition

Define a property along with its initial value.

lens : Lens<'a, 's>
value : 'a
Returns: PropertyDefinition

lens name this get set

Full Usage: lens name this get set

Parameters:
    name : string
    this : 's
    get : World -> 'a
    set : 'a -> World -> unit

Returns: Lens<'a, 's>

Make a writable lens.

name : string
this : 's
get : World -> 'a
set : 'a -> World -> unit
Returns: Lens<'a, 's>

lensReadOnly name this get

Full Usage: lensReadOnly name this get

Parameters:
    name : string
    this : 's
    get : World -> 'a

Returns: Lens<'a, 's>

Make a read-only lens.

name : string
this : 's
get : World -> 'a
Returns: Lens<'a, 's>

nonPersistent lens value

Full Usage: nonPersistent lens value

Parameters:
    lens : Lens<'a, 's>
    value : 'a

Returns: PropertyDefinition

Define a property along with its initial value, also initializing its global attributes as non-persistent.

lens : Lens<'a, 's>
value : 'a
Returns: PropertyDefinition

variable lens var

Full Usage: variable lens var

Parameters:
Returns: PropertyDefinition

Define a variable property.

lens : Lens<'a, 's>
var : World -> 'a
Returns: PropertyDefinition

Type something to start searching.