Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Now"

Index

Functions

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.

    Type parameters

    • A

    Parameters

    • comp: IO<A>

    Returns Now<Future<A>>

performStream

  • Takes a stream of IO actions and return a stream in a now computation. When run the now computation executes each IO action and delivers their result into the created stream.

    Type parameters

    • A

    Parameters

    Returns Now<Stream<A>>

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.

    Type parameters

    • A

    Parameters

    Returns Now<Future<A>>

run

  • run<A>(now: Now<A>): A
  • Type parameters

    • A

    Parameters

    Returns A

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.

    Type parameters

    • A

    Parameters

    Returns Promise<A>

sample

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

    Type parameters

    • A

    Parameters

    Returns Now<A>

Generated using TypeDoc