diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-04-05 00:41:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-04-05 00:41:08 -0700 |
commit | 24b2352dcc27e6215c7b837db2bcdeed8847e1ef (patch) | |
tree | ad0ee0d6cee2cb48556354ae0ecd3e967b16c313 | |
parent | 0c1d77905b897f2c6f98e0a67f4f9f495b6fb622 (diff) | |
download | txr-24b2352dcc27e6215c7b837db2bcdeed8847e1ef.tar.gz txr-24b2352dcc27e6215c7b837db2bcdeed8847e1ef.tar.bz2 txr-24b2352dcc27e6215c7b837db2bcdeed8847e1ef.zip |
infix: define = operator mapping to identity
* stdlib/infix.tl (toplevel): New prefix operator =
at 0 precedence. This is useful for specifying an
infix formula that is not being autodetected by ifx
nicely. For instance an expression containing
only array references can be obtained as (= a[i][j]).
-rw-r--r-- | stdlib/infix.tl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/infix.tl b/stdlib/infix.tl index b08f6c90..d6996bad 100644 --- a/stdlib/infix.tl +++ b/stdlib/infix.tl @@ -48,6 +48,8 @@ trunc floor ceil round lognot))) (new (ifx-oper 0 fun) arity :prefix assoc :right funp t)) +(new (ifx-oper 0 '=) arity :prefix assoc :right lispsym 'identity) + (new (ifx-oper 10 ':=) assoc :right lispsym 'set) (new (ifx-oper 11 'or)) (new (ifx-oper 12 'and)) |