]> gitweb.factorcode.org Git - factor.git/commitdiff
namespaces.extras: rename ?xor to xor* and add inline
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 25 Feb 2023 15:05:21 +0000 (09:05 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 26 Feb 2023 23:11:04 +0000 (17:11 -0600)
extra/namespaces/extras/extras.factor

index d107c48ae7c232b3e90e0afcd3fc267715887ef4..42d55501f2c1e0b816e7607f674d332bc1362344 100644 (file)
@@ -11,12 +11,12 @@ ERROR: variable-required variable ;
 : 2required ( symbol1 symbol2 -- obj1 obj2 ) [ required ] bi@ ; inline
 : 2get ( symbol1 symbol2 -- obj1 obj2 ) [ get ] bi@ ; inline
 
-: ?xor ( obj1 obj2 -- xor first? )
+: xor* ( obj1 obj2 -- xor first? )
     [ swap [ 2drop f f ] [ f ] if* ]
-    [ [ t ] [ f f ] if* ] if* ;
+    [ [ t ] [ f f ] if* ] if* ; inline
 
 ERROR: one-variable-only symbol1 symbol2 value1 value2 ;
 
 : one-of ( symbol1 symbol2 -- str/f first? )
-    2dup [ get ] bi@ 2dup ?xor over
+    2dup [ get ] bi@ 2dup xor* over
     [ [ 4drop ] 2dip ] [ one-variable-only ] if ;