| 1 | initial version |
Sage already has an infix_operator decorator:
sage: @infix_operator('or')
....: def f(x,y): return x.add(y, hold=True)
....:
sage: x |f| x |f| x
(x + x) + x
See http://sagemath.org/doc/reference/sage/misc/decorators.html?highlight=infix_operator#sage.misc.decorators.infix_operator
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.