Module

Data.Incremental.Eq

Package
purescript-incremental-functions
Repository
paf31/purescript-incremental-functions

#Atomic Source

newtype Atomic a

A change structure for any type with equality.

Constructors

Instances

#replace Source

replace :: forall a. a -> Change (Atomic a)

Change by replacing the current value.

#map Source

map :: forall b a. (a -> b) -> Jet (Atomic a) -> Jet (Atomic b)

Change an Atomic value using a regular function.

#lift2 Source

lift2 :: forall c b a. (a -> b -> c) -> Jet (Atomic a) -> Jet (Atomic b) -> Jet (Atomic c)

Combine two Atomic values using a regular function.

Note: The result will change (entirely) if either argument changes. If changes should be independent, consider using a Tuple instead.

#apply Source

apply :: forall b a. Jet (Atomic (a -> b)) -> Jet (Atomic a) -> Jet (Atomic b)

Combine two Atomic values in an applicative style.

#mapAtomic Source

mapAtomic :: forall b a. (a -> b) -> Jet (Atomic a) -> Jet (Atomic b)

Change an Atomic value using a regular function.

This alias for map will be removed in a future version.