netwire-4.0.1: Flexible wire arrows for FRP

Copyright(c) 2012 Ertugrul Soeylemez
LicenseBSD3
MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone
LanguageHaskell2010

Control.Wire.Trans.Embed

Contents

Description

Combinators for embedding wires.

Synopsis

Embedding wires

embed Source

Arguments

:: Monad m 
=> (a -> Time)

Time delta for the subwire.

-> (Either e c -> Either e b -> Either e c)

Folding function.

-> Either e c

Fold base value.

-> Wire e m a b

Subwire to step.

-> Wire e m a c 

Performs the argument wire with the input time delta. It is stepped often enough to catch up with the main wire. The individual results are combined as given by the fold (second and third argument).

  • Complexity: O(n) time wrt stepping the subwire, where n is the number of times the subwire is stepped.
  • Depends: like argument wire, if stepped.
  • Inhibits: When the fold results in a Left.