package lambda_streams

  1. Overview
  2. Docs
type 'a t = private ('a -> unit) -> unit

Generalizes the notion of an asynchronous stream.

type 'a input = 'a t
type 'a output = 'a t

Asynchronous output streams are repesented identically to input streams (push-based) .

type 'a connection = ('a input, unit Sync.output) Connection.t

Represents a connection-based input stream with a synchronous output stream to close it.

type 'a connection' = ('a input, unit output) Connection.t

Represents a connection-based input stream with an asynchronous output stream to close it.

val make : (('a -> unit) -> unit) -> 'a t
val listen : ('a -> unit) -> 'a t -> unit

Listens for values from an asynchronous stream, somewhat similar to Sync.next but push-based instead of pull-based.

val pure : 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val filter : ('a -> bool) -> 'a t -> 'a t
val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
module type INTERVAL = sig ... end

This functor is for cross-platform compatibility. The functionality needs to work like Js.Global.setInterval.

module Interval (I : INTERVAL) : sig ... end
OCaml

Innovation. Community. Security.