package lambda_streams

  1. Overview
  2. Docs

Module Lambda_streams.SignalSource

Represents a signal that either has data or is terminated. Used for Finite streams.

Sourcetype 'a t =
  1. | Data of 'a
  2. | EndOfSignal
Sourceval pure : 'a -> 'a t
Sourceval empty : unit -> 'a t
Sourceval default : 'a -> 'a t -> 'a

Get the signal data or the provided default value

Sourceval satisfies : ('a -> bool) -> 'a t -> bool

Check whether the signal satisfies the predicate. Returns false if it's EndOfSignal

Sourceval map : ('a -> 'b) -> 'a t -> 'b t
Sourceval filter : ('a -> bool) -> 'a t -> 'a t
Sourceval fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
Sourceval from_option : 'a option -> 'a t
Sourceval to_option : 'a t -> 'a option
OCaml

Innovation. Community. Security.