-
-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Right now coconut's operator functions are restricted to single-word operators.(is) and (+) work as expected, but (is not) and (not in) are CoconutParseErrors. This is currently not explicitly stated, the multi-word operators are simply missing from the list of available operator functions, making it easy to gloss over the list of operator.<something> that come from python, and concentrating only on the new coconut operators.
So if this restriction isn't easy to lift, I'd like to suggest adding a warning about it to the docs and refer to the example from the addpattern-decorator-section, that uses a function composition (. is None) ..> (not).
This came about when I tried using them in pattern matching with implicit partial application of the form (. <op> <arg>). Here I have seen an additional gotcha: while (is not) is an invalid operator function, (. is not None) is valid and is compiled like (. is (not None)).