Module

FRP.Behavior

Package
purescript-behaviors
Repository
paf31/purescript-behaviors

#Behavior Source

newtype Behavior a

A Behavior acts like a continuous function of time.

We can construct a sample a Behavior from some Event, combine Behaviors using Applicative, and sample a final Behavior on some other Event.

Instances

#step Source

step :: forall a. a -> Event a -> Behavior a

Create a Behavior which is updated when an Event fires, by providing an initial value.

#sample Source

sample :: forall c b a. (a -> b -> c) -> Behavior a -> Event b -> Event c

Sample a Behavior on some Event.

#sample' Source

sample' :: forall b a. Behavior a -> Event b -> Event a

Sample a Behavior on some Event, discarding the event's payload.