NAME

concat - concatenate arrays

SYNOPSIS

arr0.concat(arr1,arr2,...)

DESCRIPTION

The concat method provides the same functionality as the ## operator. Concatenation is always applied along the last axis of an array. For more control over the axis of concatenation, see the laminate method.

Note that the concat method is used to overload the ## operator.

RETURN VALUE

The concatenated result

ERRORS

ShapeCheck if any argument is not conformant to the length of the last axis of arr0

EXAMPLE

    a = [2,3].iterate()
    a.concat(3->iterate() + 10, 3->iterate() + 10)
 0  1  2
 3  4  5
10 11 12
20 21 22

    // The concat method is used to overload the ## operator
    class lst {
        public var list;
        public proc create(l) { list = l; }
        public proc concat() {
            "concat ":, oadl::argvec(), '\n';
            return new lst(list.concat#(oadl::argvec()));
        }
    }
    x = new lst("foo");
    x = x ## "bar"
concat: bar
    x.list
foobar

SEE ALSO

laminate