Skip to contents

Creates a List monad instance which can be used with the flatMap operator %>>=%. See the Monads in R vignette for more details.

This container, when flatMapped, unpacks the contained values, concatenates them, passes this to the next expression, then rewraps the result in a new List.

See also

Public fields

value

value contained in the instance

Methods


Method new()

create a new List instance

Usage

List$new(...)

Arguments

...

values to be contained

Returns

a new List instance


Method bind()

bind when using flatMap (%>>=%)

Usage

List$bind(f, expr)

Arguments

f

function to apply

expr

expression of the function


Method clone()

The objects of this class are cloneable with this method.

Usage

List$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.