Feedback

Contents

Feedback#

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

Bases: 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")
>>> Box('f', x @ y.delay(), z @ y).feedback().draw(
...     path="docs/_static/feedback/feedback-example.png")
../_images/feedback-example.png
Parameters:
  • arg (Diagram) –

  • dom (T) –

  • cod (T) –