]> gitweb.factorcode.org Git - factor.git/commitdiff
combinators.extras: rename new ?call word to chain.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 14 Nov 2020 20:16:23 +0000 (12:16 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 14 Nov 2020 20:16:23 +0000 (12:16 -0800)
extra/combinators/extras/extras-tests.factor
extra/combinators/extras/extras.factor

index f3bda40cb600c87daa0580e2ca12fdf9cbd45f05..3df67e01efdbee48bc137e8a9b473e86386d2ce9 100644 (file)
@@ -61,10 +61,10 @@ splitting tools.test ;
     } cond*
 ] unit-test
 
-{ f } [ f { } ?call ] unit-test
-{ 3 } [ H{ { 1 H{ { 2 3 } } } } { [ 1 of ] [ 2 of ] } ?call ] unit-test
-{ f } [ H{ { 1 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } ?call ] unit-test
-{ f } [ H{ { 2 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } ?call ] unit-test
+{ f } [ f { } chain ] unit-test
+{ 3 } [ H{ { 1 H{ { 2 3 } } } } { [ 1 of ] [ 2 of ] } chain ] unit-test
+{ f } [ H{ { 1 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } chain ] unit-test
+{ f } [ H{ { 2 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } chain ] unit-test
 { 5 } [
-    "hello factor!" { [ " " split ] [ first ] [ length ] } ?call
+    "hello factor!" { [ " " split ] [ first ] [ length ] } chain
 ] unit-test
index 77e1c3ec8808a748cb094e0eaa5845900ab38f0c..eddf1c186e05e9a2978c4c3a216b03dcd5bfaf93 100644 (file)
@@ -104,5 +104,5 @@ DEFER: cond*
     [ dup callable? [ nip call ] [ second call ] if ]
     [ no-cond ] if* ;
 
-MACRO: ?call ( quot -- quot )
+MACRO: chain ( quots -- quot )
     <reversed> [ ] [ swap '[ [ @ @ ] [ f ] if* ] ] reduce ;