Open evhub opened 10 years ago
For adding comparison operators:
bind :: = :: ≠(x,y) = x != y
For creating operators over multiple arguments:
bind :: +(x,y,z) = add(x,y,z)
bind :: *(__) = mul(__)
For creating a unary function:
bind :: ?(x) = bool(x)
For creating an open/close group:
bind :: "(x)" = str(x)
For redefining an operator:
bind :: + :: +(__) = add(__)
The default operators should be the same, but use special funcfloats wrapping Python instead of pure Rabbit.
Additionally, only these operators should be hardcoded and unredefinable:
#
;;
::
= # You can redefine =, but that redefines the comparison =
:
.
\
§
Operators should be defined using a special binding system. An operator function should be bound to an operator, which should be given a level and (optionally) made reserved. Possible syntax: