Command: append
  
Syntax: 
  s2 = append(s1, x)
  
Description: 
  Create a new sequence identical to s1 but with x added on the end
  as the last element. The length of s2 will be length(s1) + 1. 
  
Comments: 
  If x is an atom this is equivalent to s2 = s1 & x. If x is a 
  sequence it is not equivalent. 
  
  The extra storage is allocated automatically and very 
  efficiently with Euphoria's dynamic storage allocation. 
  The case where s1 and s2 are actually the same variable 
  (as in Example 1 below) is highly optimized.
  
Example 1: 
   You can use append to dynamically grow a sequence, e.g.

      sequence x
      
      x = {}
      for i = 1 to 10 do
  x = append(x, i)
      end for
      -- x is now {1,2,3,4,5,6,7,8,9,10}
 
Example 2: 
   Any kind of Euphoria object can be appended to a sequence, e.g.
       
       sequence x, y, z
       
       x = {"fred", "barney"}
       y = append(x, "wilma")
       -- y is now {"fred", "barney", "wilma"}

      z = append(append(y, "betty"), {"bam", "bam"})
      -- z is now {"fred", "barney", "wilma", "betty", {"bam", "bam"}}
      
See Also: 
  prepend, concatenation (&) and sequence-formation {,,} operators 
  in refman.doc
  
