Infix Operators#

class sigmaepsilon.core.infix.InfixOperator(function: Callable)[source]#

Implements a custom Infix operator using the operators ‘<<’, ‘>>’ and ‘|’.

Examples

>>> x = InfixOperator(lambda x, y: x * y)
>>> print(2 | x | 4)
8
>>> x = InfixOperator(lambda x, y: x + y)
>>> print(2 << x >> 4)
6