]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/circular/circular.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / circular / circular.factor
index d47b954ecfb1b555c4d905609347c6692a40e99d..b3be4651cd627799269edbefa72ac168f97718ba 100644 (file)
@@ -43,16 +43,15 @@ TUPLE: growing-circular < circular length ;
 M: growing-circular length length>> ;
 
 <PRIVATE
+
 : full? ( circular -- ? )
     [ length ] [ seq>> length ] bi = ;
 
-: set-last ( elt seq -- )
-    [ length 1- ] keep set-nth ;
 PRIVATE>
 
 : push-growing-circular ( elt circular -- )
     dup full? [ push-circular ]
-    [ [ 1+ ] change-length set-last ] if ;
+    [ [ 1 + ] change-length set-last ] if ;
 
 : <growing-circular> ( capacity -- growing-circular )
     { } new-sequence 0 0 growing-circular boa ;