Note: we use the term 'list' interchangeably with 'array' here. Technically speaking we mean "reference to an array" when we say "reference to a list" and so on, but we don't worry too much about the distinction in TT land.
Note: all these methods can be called as subroutines, passing a reference to an array as the first argument.
Constructor method to create a new List object. A reference to a List object, array or a list of parameters can be passed as argument(s) to define the contents of the List object. If a List object is passed as an argument then it is first cloned. If a reference to an array is passed then it is blessed into a List object without being copied. If a list of parameters is passed then they are merged into a new array which is then blessed and returned as a List object.
Creates a new List object as a copy of the current one. A reference to a List object, array or a list of argument can be passed to define any additional data items to be added to the cloned List object.
Returns a reference to an unblessed array containing a copy of the current List object and any additional items passed by reference to another list object, array or as a list of arguments.
sort() and nsort() should take named parameters.
[% list.sort(field => 'name') %] rather than [% list.sort('name') %]