diff options
-rw-r--r-- | stdlib/infix.tl | 1 | ||||
-rw-r--r-- | tests/012/infix.tl | 4 | ||||
-rw-r--r-- | txr.1 | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/stdlib/infix.tl b/stdlib/infix.tl index 1f544006..66bd9037 100644 --- a/stdlib/infix.tl +++ b/stdlib/infix.tl @@ -104,6 +104,7 @@ (new (ifx-oper 35 '-) arity :prefix assoc :right) (new (ifx-oper 35 '+) arity :prefix assoc :right) +(new (ifx-oper 35 '~) arity :prefix assoc :right lispsym 'lognot) (new (ifx-oper 40 '*)) (new (ifx-oper 40 '/)) diff --git a/tests/012/infix.tl b/tests/012/infix.tl index d3e1db54..a9d71ecc 100644 --- a/tests/012/infix.tl +++ b/tests/012/infix.tl @@ -196,3 +196,7 @@ (a + b + c) (+ a b c) (a + b + c + d) (+ a b c d) (a * b * c + d * e + e * f * g) (+ (* a b c) (* d e) (* e f g))) + +(mtest-ifx + (~ a) (lognot a) + (~ a | ~ b) (logior (lognot a) (lognot b))) @@ -55486,7 +55486,7 @@ mathfn \f[4]=\f[],prefix,0,right \f[4]&\f[],infix,7,left \f[4]<< >>\f[],infix,8,left \f[4]+ -\f[],infix,9,left -\f[4]+ -\f[],prefix,10,right +\f[4]+ - ~\f[],prefix,10,right \f[4]* / %\f[],infix,11,left \f[4]**\f[],infix,12,right \f[4]++ --\f[],prefix,13,right @@ -55604,13 +55604,14 @@ that only a single evaluation takes place: a || b -> (or a b) a && b -> (and a b) - ! a -> (not a) + ! a -> (not a) a != b -> (/= a b) a | b -> (logior a b) a ~ b -> (logxor a b) a & b -> (logand a b) + ~ b -> (lognot b) a % b -> (mod a b) a // b -> (floor a b) |