Header menu logo DynamicObj

Operators Module

Functions and values

Function or value Description

(++) object (name, newValue)

Full Usage: (++) object (name, newValue)

Parameters:
    object : 'a
    name : string
    newValue : 'b

Returns: 'a

Returns an instance with: 1. this property added if it wasn't present 2. this property updated otherwise

object : 'a
name : string
newValue : 'b
Returns: 'a

(++?) object (name, newValue)

Full Usage: (++?) object (name, newValue)

Parameters:
    object : 'a
    name : string
    newValue : 'b option

Returns: 'a

Acts as (++) if the value is Some, returns the same object otherwise

object : 'a
name : string
newValue : 'b option
Returns: 'a

(++??) object (name, newValue, f)

Full Usage: (++??) object (name, newValue, f)

Parameters:
    object : 'a
    name : string
    newValue : 'b option
    f : 'b -> 'c

Returns: 'a

Acts as (++?) but maps the valid value through the last argument

object : 'a
name : string
newValue : 'b option
f : 'b -> 'c
Returns: 'a

object -- name

Full Usage: object -- name

Parameters:
    object : 'a
    name : string

Returns: 'a

Returns an instance: 1. the same if there was no requested property 2. without the requested property if there was

object : 'a
name : string
Returns: 'a

Type something to start searching.