]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: use `[ ] append-as` and `[ ] concat-as` in more places
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 17 Feb 2023 04:54:03 +0000 (22:54 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 26 Feb 2023 23:11:04 +0000 (17:11 -0600)
basis/calendar/format/format.factor
basis/compiler/compiler.factor
basis/hints/hints.factor
basis/xmode/utilities/utilities.factor
core/combinators/combinators.factor
core/generic/math/math.factor
extra/combinators/extras/extras.factor
extra/multi-methods/multi-methods.factor

index d9c23fc2f8fc41a9b101ee418717b9b2d43e93a6..8a30cb0b9a5d72099234b8ac2d9363925fe782e9 100644 (file)
@@ -11,7 +11,7 @@ MACRO: formatted ( spec -- quot )
         {
             { [ dup word? ] [ 1quotation ] }
             { [ dup quotation? ] [ ] }
-            [ [ nip write ] curry [ ] like ]
+            [ [ nip write ] curry ]
         } cond
     ] map [ cleave ] curry ;
 
index c2a786412a3a55bdb4d85b50104b08cf2c9b19c0..485a923d7c7599d97bff482b2d9c02b00e54ac96 100644 (file)
@@ -74,7 +74,7 @@ M: word combinator? inline? ;
     swap [ finish-compilation ] [ compiled get set-at ] bi return ;
 
 : not-compiled-def ( word error -- def )
-    '[ _ _ not-compiled ] [ ] like ;
+    '[ _ _ not-compiled ] ;
 
 : deoptimize* ( word -- * )
     dup def>> deoptimize-with ;
index 9c23d9e45b0e9ecc46d1fd2adf7e3fa4194e89bd..fa6bd6d50d634cef45839daa46119c67f6b98ed5 100644 (file)
@@ -28,7 +28,7 @@ M: object specializer-declaration class-of ;
     [ drop object eq? ] assoc-reject
     [ [ t ] ] [
         [ swap specializer-predicate append ] { } assoc>map
-        [ ] [ swap [ f ] \ if 3array append [ ] like ] map-reduce
+        [ ] [ swap [ f ] \ if 3array [ ] append-as ] map-reduce
     ] if-empty ;
 
 : specializer-cases ( quot specializer -- alist )
index 2d5e3c7f4041f632231082cd8765fe6ac1d7a2b4..4329b3349ff3b63279d2a6a32d457387ff5fc928 100644 (file)
@@ -25,7 +25,7 @@ IN: xmode.utilities
     [ object set tag set ] prepose with-scope ; inline
 
 MACRO: (init-from-tag) ( specs -- quot )
-    [ tag-init-form ] map concat [ ] like
+    [ tag-init-form ] map [ ] concat-as
     [ with-tag-initializer ] curry ;
 
 : init-from-tag ( tag tuple specs -- tuple )
index ecad0eb4df71607b575a52fe8a71a6d719b4c624..6584655751b233b5ff08c399a4a09b8308a9f43b 100644 (file)
@@ -48,28 +48,32 @@ SLOT: terminated?
     [ call ] with each ;
 
 : cleave>quot ( seq -- quot )
-    [ [ keep ] curry ] map concat [ drop ] append [ ] like ;
+    [ [ keep ] curry ] map concat
+    [ drop ] [ ] append-as ;
 
 ! 2cleave
 : 2cleave ( x y seq -- )
     [ 2keep ] each 2drop ;
 
 : 2cleave>quot ( seq -- quot )
-    [ [ 2keep ] curry ] map concat [ 2drop ] append [ ] like ;
+    [ [ 2keep ] curry ] map concat
+    [ 2drop ] [ ] append-as ;
 
 ! 3cleave
 : 3cleave ( x y z seq -- )
     [ 3keep ] each 3drop ;
 
 : 3cleave>quot ( seq -- quot )
-    [ [ 3keep ] curry ] map concat [ 3drop ] append [ ] like ;
+    [ [ 3keep ] curry ] map concat
+    [ 3drop ] [ ] append-as ;
 
 ! 4cleave
 : 4cleave ( w x y z seq -- )
     [ 4keep ] each 4drop ;
 
 : 4cleave>quot ( seq -- quot )
-    [ [ 4keep ] curry ] map concat [ 4drop ] append [ ] like ;
+    [ [ 4keep ] curry ] map concat
+    [ 4drop ] [ ] append-as ;
 
 ! spread
 : shallow-spread>quot ( seq -- quot )
@@ -90,7 +94,7 @@ ERROR: no-cond ;
     [ no-cond ] if* ;
 
 : alist>quot ( default assoc -- quot )
-    [ rot \ if 3array append [ ] like ] assoc-each ;
+    [ rot \ if 3array [ ] append-as ] assoc-each ;
 
 : cond>quot ( assoc -- quot )
     [ dup pair? [ [ t ] swap 2array ] unless ] map
index 5be93afc4cf8e5bfaf35f378e0fe6e26165f2ba8..ecb200b3507741e8856f75c62f1592f6d1fb4bcb 100644 (file)
@@ -41,7 +41,7 @@ PRIVATE>
 ERROR: no-math-method left right generic ;
 
 : default-math-method ( generic -- quot )
-    [ no-math-method ] curry [ ] like ;
+    [ no-math-method ] curry ;
 
 <PRIVATE
 
index 0e4338ce834be1e3c6cf856492f7645ef6ec12e4..a0a95b122f8aae44e2271e3e6ad135bcaf9251ad 100644 (file)
@@ -104,7 +104,7 @@ MACRO:: n-falsify ( n -- quot )
 
 <<
 : alist>quot* ( default assoc -- quot )
-    [ rot \ if* 3array append [ ] like ] assoc-each ;
+    [ rot \ if* 3array [ ] append-as ] assoc-each ;
 
 : cond*>quot ( assoc -- quot )
     [ dup pair? [ [ drop ] prepend [ t ] swap 2array ] unless ] map
index cb0e3b2100feb8f17bcf1a53a925515e55c59db2..34deb25240c0b74d3524ab6000d555a5b9c093cb 100644 (file)
@@ -71,7 +71,7 @@ SYMBOL: total
 : prepare-methods ( methods -- methods' prologue )
     canonicalize-specializers
     [ length [ prepare-method ] curry assoc-map ] keep
-    [ [ get ] curry ] map concat [ ] like ;
+    [ [ get ] curry ] map [ ] concat-as ;
 
 ! Part II: Topologically sorting specializers
 : maximal-element ( seq quot -- n elt )
@@ -117,7 +117,7 @@ SYMBOL: total
     [ drop object eq? ] assoc-reject
     [ [ t ] ] [
         [ (multi-predicate) ] { } assoc>map
-        unclip [ swap [ f ] \ if 3array append [ ] like ] reduce
+        unclip [ swap [ f ] \ if 3array [ ] append-as ] reduce
     ] if-empty ;
 
 : argument-count ( methods -- n )