core :: Sequence :: append
coll
var a = [1,2,3] a.append([7..9]) assert a == [1,2,3,7,8,9]
Alias of add_all
add_all
# Add each item of `coll` after the last. # # var a = [1,2,3] # a.append([7..9]) # assert a == [1,2,3,7,8,9] # # Alias of `add_all` fun append(coll: Collection[E]) do add_all(coll)
redef fun append(s) do var s_length = s.length if target.capacity < s.length then enlarge(s_length + target._length) for i in s do target.add i end
redef fun append(e) do mutex.lock real_collection.append e mutex.unlock end
# var b = new Bytes.empty # b.append([104, 101, 108, 108, 111]) # assert b.to_s == "hello" redef fun append(arr) do if arr isa Bytes then append_ns(arr.items, arr.length) else for i in arr do add i end end