Documentation for routine join

Documentation for routine join, assembled from the following types:

class Any

From Any

(Any) method join

Defined As:

    method join(--> TODO)

TODO

class List

From List

(List) routine join

Defined as:

sub    join($separator*@list --> Str:D)
method join(List:D: $separator --> Str:D)

Treats the elements of the list as strings, interleaves them with $separator and concatenates everything into a single string.

Example:

join '', <a b c>;             # RESULT: «a, b, c» 

Note that the method form does not flatten sublists:

say (1, <a b c>).join('|');     # OUTPUT: «1|a b c␤» 

class Thread

From Thread

(Thread) method join

method join(Thread:D)

Waits for the thread to finish.