From 24b2352dcc27e6215c7b837db2bcdeed8847e1ef Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 5 Apr 2025 00:41:08 -0700 Subject: 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]). --- stdlib/infix.tl | 2 ++ 1 file changed, 2 insertions(+) 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)) -- cgit v1.2.3