lib: make Seq::append an alias of add_all (instead of relying on an inefficient defau...
authorJean Privat <jean@pryen.org>
Fri, 15 Aug 2014 19:54:52 +0000 (15:54 -0400)
committerJean Privat <jean@pryen.org>
Fri, 15 Aug 2014 19:54:52 +0000 (15:54 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/collection/abstract_collection.nit

index 5501290..93d882a 100644 (file)
@@ -781,7 +781,9 @@ interface Sequence[E]
        #     var a = [1,2,3]
        #     a.append([7..9])
        #     assert a  == [1,2,3,7,8,9]
-       fun append(coll: Collection[E]) do for i in coll do push(i)
+       #
+       # Alias of `add_all`
+       fun append(coll: Collection[E]) do add_all(coll)
 
        # Remove the last item.
        #