Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|---|

Safe Haskell | None |

Combinators for embedding wires.

# Embedding wires

:: 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`

.