]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/multi-methods/multi-methods.factor
factor: use `[ ] append-as` and `[ ] concat-as` in more places
[factor.git] / extra / multi-methods / multi-methods.factor
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 )