]> gitweb.factorcode.org Git - factor.git/commitdiff
using reverse! when possible.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 26 Apr 2012 03:09:36 +0000 (20:09 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 26 Apr 2012 03:09:36 +0000 (20:09 -0700)
basis/unicode/breaks/breaks.factor
core/classes/classes.factor
core/combinators/combinators.factor
core/splitting/splitting.factor

index 9a40a8b27d98e2c43028ae8c37528a45fb52ba55..914e3f2f864293144bd8cf08d9c3943decf92bf1 100644 (file)
@@ -128,7 +128,7 @@ PRIVATE>
     [ first-grapheme ] >pieces ;
 
 : string-reverse ( str -- rts )
-    >graphemes reverse concat ;
+    >graphemes reverse! concat ;
 
 <PRIVATE
 
index 3256785ecb2a47cf96f1dc18896f3ef4dfaa4526..617ddcc331679a50296495b957a0b0b479b5ca0a 100644 (file)
@@ -102,7 +102,7 @@ M: predicate reset-word
     dup class? [ "superclass" word-prop ] [ drop f ] if ;
 
 : superclasses ( class -- supers )
-    [ superclass ] follow reverse ;
+    [ superclass ] follow reverse! ;
 
 : superclass-of? ( class superclass -- ? )
     superclasses member-eq? ;
index 95a1b980eafc6fca9bbfba1375caf31f9311b1c1..adb89767af27194af97e40c6b59f938356ec0f6c 100644 (file)
@@ -87,7 +87,7 @@ ERROR: no-cond ;
 
 : cond>quot ( assoc -- quot )
     [ dup pair? [ [ t ] swap 2array ] unless ] map
-    reverse [ no-cond ] swap alist>quot ;
+    reverse! [ no-cond ] swap alist>quot ;
 
 ! case
 ERROR: no-case object ;
index b9b4f87b24cc837a34fc4ee88651a5870818b044..b3adad6bd6edcd823467390c6bd73aea475fdb5a 100644 (file)
@@ -48,7 +48,7 @@ PRIVATE>
     dupd find drop [ swap [ dup 1 + ] dip snip ] [ f ] if* ; inline
 
 : split1-last ( seq subseq -- before after )
-    [ <reversed> ] bi@ split1 [ reverse ] bi@
+    [ <reversed> ] bi@ split1 [ reverse! ] bi@
     dup [ swap ] when ;
 
 : split1-last-slice ( seq subseq -- before-slice after-slice )