Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Memoizing wire transformers.
Memoizing
class Arrow >~ => WCache t (>~) | >~ -> t whereSource
Remember the most recently produced values. You can limit both the maximum age and the number of remembered values. The second input value specifies the maximum age, the third specifies the maximum number.
Note: Inhibtion is never remembered.
Note: Decreasing the size limit has O(n * log n) complexity, where n is the difference to the old limit.
- Depends: Current instant.
- Inhibits: Whenever result is not cached and argument wire inhibits.
(AdditiveGroup t, MonadClock t m, Ord t) => WCache t (Kleisli m) |
class Arrow >~ => WPurify (>~) whereSource
Remember the last produced value. Whenever an input is repeated, the argument wire is ignored and the memoized result is returned instantly. Note: inhibition will not be remembered.
- Depends: Current instant.
- Inhibits: Like the argument wire for non-memoized inputs.