ob_factory

Contents

ob_factory#

discopy.cat.ob_factory(cls)[source]#

Allows the tensor product of a Ty subclass to remain within the subclass.

Parameters:

cls – Some subclass of Ty.

Note

The factory method pattern (FMP) is used all over DisCoPy.