]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/persistent/vectors/vectors.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / persistent / vectors / vectors.factor
index 5927171aa3b3d13e54301d65bf104e8226f5bd39..2527959f325f0317cd6540a0c3ab2a625e45f2fe 100644 (file)
@@ -55,13 +55,13 @@ M: persistent-vector nth-unsafe
     [ 1array ] dip node boa ;
 
 : 2node ( first second -- node )
-    [ 2array ] [ drop level>> 1+ ] 2bi node boa ;
+    [ 2array ] [ drop level>> 1 + ] 2bi node boa ;
 
 : new-child ( new-child node -- node' expansion/f )
     dup full? [ tuck level>> 1node ] [ node-add f ] if ;
 
 : new-last ( val seq -- seq' )
-    [ length 1- ] keep new-nth ;
+    [ length 1 - ] keep new-nth ;
 
 : node-set-last ( child node -- node' )
     clone [ new-last ] change-children ;
@@ -86,7 +86,7 @@ M: persistent-vector ppush ( val pvec -- pvec' )
     clone
     dup tail>> full?
     [ ppush-new-tail ] [ ppush-tail ] if
-    [ 1+ ] change-count ;
+    [ 1 + ] change-count ;
 
 : node-set-nth ( val i node -- node' )
     clone [ new-nth ] change-children ;
@@ -166,7 +166,7 @@ M: persistent-vector ppop ( pvec -- pvec' )
                 clone
                 dup tail>> children>> length 1 >
                 [ ppop-tail ] [ ppop-new-tail ] if
-            ] dip 1- >>count
+            ] dip 1 - >>count
         ]
     } case ;