Define unicode operators
See original GitHub issueThe unicode alternatives of the operators are brilliant. But is there any way that I can define my own one?
For example, I’m writing a function that checks whether a variable is an element of a set, which is either a finite one (a list, e.g., ⟦1,3,5,7,9⟧
), or a range over an ordered field (e.g., ⟦1…100, ℝ⟧
). I can define the infix function `elemOf`
(with back-ticks), but can I make an alias to the unicode symbols: ∈
, ∉
(without back-ticks), etc.?
Also, is it possible to map a data
constructor to a unicode symbol set? Like use ⟦...⟧
as an alternative to the set(...)
constructor.
Maybe this is a very stupid question, but can anyone point out some other references to solving my problem? I am a haskell
guy and I’m really new in coconut
and python
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
This is now live on
coconut-develop>=2.0.0-post_dev4
! Check out thedevelop
documentation for more info.Thanks; glad to hear it!