]> gitweb.factorcode.org Git - factor.git/commitdiff
assocs.extras: fry can easily curry the top item of the stack.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 20 Feb 2018 07:21:28 +0000 (01:21 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 20 Feb 2018 07:21:28 +0000 (01:21 -0600)
extra/assocs/extras/extras.factor

index 1ce887e8afca3233ed3d5c863e086901bc4ca292..f7f7f0202f078d5d4a151340debb4caf46869463 100644 (file)
@@ -104,7 +104,7 @@ PRIVATE>
 : expand-keys-push-as ( assoc exemplar -- hashtable' )
     [
         [ [ dup sequence? [ 1array ] unless ] dip ]
-        [ '[ 2array _ push ] curry each ]
+        [ '[ _ 2array _ push ] each ]
     ] dip assoc>object ;
 
 : expand-keys-push ( assoc -- hashtable' )
@@ -113,7 +113,7 @@ PRIVATE>
 : expand-values-set-at-as ( assoc exemplar -- hashtable' )
     [
         [ dup sequence? [ 1array ] unless swap ]
-        [ '[ _ set-at ] curry each ]
+        [ '[ _ _ set-at ] each ]
     ] dip assoc>object ;
 
 : expand-values-set-at ( assoc -- hashtable' )
@@ -122,7 +122,7 @@ PRIVATE>
 : expand-values-push-at-as ( assoc exemplar -- hashtable' )
     [
         [ dup sequence? [ 1array ] unless swap ]
-        [ '[ _ push-at ] curry each ]
+        [ '[ _ _ push-at ] each ]
     ] dip assoc>object ;
 
 : expand-values-push-at ( assoc -- assoc )