[Feature Request] Infix operators
lenianiva opened this issue · 3 comments
lenianiva commented
Would it fit the theme of this package to have infix operators? For example, suppose I want the operator ->
to act as an infix operator:
class Implies(Infix):
op = '->'
parse("a -> b -> c") == Infix([Symbol("a"), Symbol("b"), Symbol("c")])
This could be done immediately upon finishing parsing a list, for example.
jd-boyd commented
I'm fairly dubious about this one? Where is there an existing SEXP like data format where this would be relevent?
lenianiva commented
I'm fairly dubious about this one? Where is there an existing SEXP like data format where this would be relevent?
I was thinking about Lean expressions of this form, but this is a fairly niche use case
(f1 a1 b1) -> (f2 ...) -> cond
jd-boyd commented
Until better documentation is provided about this (plus more justification on why it should be supported), I'm going to close this.