Feedback

Contents

Feedback#

class discopy.feedback.Feedback(arg, dom=None, cod=None, mem=None, left=False)[source]#

Bases: discopy.monoidal.Bubble, Box

Feedback is a bubble that takes a diagram from dom @ mem.delay() to cod @ mem and returns a box from dom to cod.

Examples

>>> x, y, z = map(Ty, "xyz")
>>> f = Box('f', x @ y.delay(), z @ y)
>>> fb = f.feedback()
>>> Equation(f, fb, symbol="$\\mapsto$").draw(
...     doctest="docs/_static/feedback/feedback-bubble.svg")
../_images/feedback-bubble.svg
Parameters: