[][src]Macro glsp::arr

macro_rules! arr {
    ($elem:expr; $n:expr) => { ... };
    ($($token:tt)*) => { ... };

Constructs an array.

The syntax is similar to the vec! macro. arr![elem; n] will repeat an element n times, or arr![a, b, c] will store several individual elements. The return type is Root<Arr>.

Splaying is supported for types which implement the Splay trait. The syntax is identical to GameLisp: arr![a, ..b, c].

In the unlikely event that an argument fails to be converted to a Val, the macro will panic. try_arr! is the non-panicking alternative.