X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=basis%2Fpersistent%2Fvectors%2Fvectors.factor;h=2527959f325f0317cd6540a0c3ab2a625e45f2fe;hp=5927171aa3b3d13e54301d65bf104e8226f5bd39;hb=3f3d57032bf29190e9bee12d168a4bce6d74653c;hpb=cd1bb8f4c8afba318249c7b756a45aa1c46ea51e diff --git a/basis/persistent/vectors/vectors.factor b/basis/persistent/vectors/vectors.factor index 5927171aa3..2527959f32 100644 --- a/basis/persistent/vectors/vectors.factor +++ b/basis/persistent/vectors/vectors.factor @@ -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 ;