# Global

##

### Methods

#### async()

Run an asynchronous IO action and return a future in the Now monad that resolves with the eventual result of the IO action once it completes. This function is what allows the Now monad to execute imperative actions in a way that is pure and integrated with FRP.

Source:
  - Now.js, line 76

#### mfixNow()

Something resembling the monadic fixpoint combinatior for Now.

Source:
  - framework.js, line 82

#### plan()

Convert a future now computation into a now computation of a future. This function is what allows a Now-computation to reach beyond the current moment that it is running in.

Source:
  - Now.js, line 115

#### runNow()

Run the given Now-computation. The returned promise resolves once the future that is the result of running the now computation occurs. This is an impure function and should not be used in normal application code.

Source:
  - Now.js, line 125

#### sample()

Returns the current value of a behavior in the Now monad. This is possible because computations in the Now monad has an associated point in time.

Source:
  - Now.js, line 94

#### stepper(initial, steps)

Creates a Behavior whose value is the last occurrence in the stream.

##### Parameters:

Name | Type | Description
--- | --- | ---
`initial` |  | the initial value that the behavior has
`steps` |  | the stream that will change the value of the behavior

Source:
  - Behavior.js, line 328

#### switcher()

From an initial behavior and a future of a behavior `switcher` creates a new behavior that acts exactly like `initial` until `next` occurs after which it acts like the behavior it contains.

Source:
  - Behavior.js, line 303

#### when(b)

Take a behavior `b` of booleans and return a behavior that for time `t` contains a future that occurs when `b` is true after `t`.

##### Parameters:

Name | Type | Description
--- | --- | ---
`b` |  | A boolean valued behavior.

Source:
  - Behavior.js, line 232