An array literal.
Similar to Array#+
.
Similar to Array#<<
.
Similar to Array#[]
, but returns NilLiteral
on out of bounds.
Similar to Array#[]=
.
Similar to Enumerable#all?
Similar to Enumerable#any?
Similar to Array#clear
Similar to Array#each
Similar to Enumerable#each_with_index
Similar to Array#empty?
Similar to Enumerable#find
Similar to Array#first
, but returns a NilLiteral
if the array is empty.
Similar to Enumerable#includes?(obj)
.
Similar to Enumerable#join
Similar to Array#last
, but returns a NilLiteral
if the array is empty.
Similar to Enumerable#map
Similar to Enumerable#map_with_index
Returns the type specified at the end of the array literal, if any.
Similar to Array#push
.
Similar to Enumerable#reduce
Similar to Enumerable#reduce
Similar to Enumerable#reject
Similar to Enumerable#select
Similar to Array#shuffle
Similar to Array#size
Similar to Array#sort
Similar to Array#sort_by
Returns a MacroId
with all of this array's elements joined by commas.
Returns the type that receives the items of the array.
Similar to Array#uniq
Similar to Array#unshift
.
Crystal::Macros::ASTNode
Reference
Reference
Object
Object
Similar to Array#+
.
Similar to Array#<<
.
Similar to Array#[]
, but returns NilLiteral
on out of bounds.
Similar to Array#[]=
.
Similar to Enumerable#all?
Similar to Enumerable#any?
Similar to Array#clear
Similar to Enumerable#each_with_index
Similar to Array#empty?
Similar to Enumerable#find
Similar to Array#first
, but returns a NilLiteral
if the array is empty.
Similar to Enumerable#includes?(obj)
.
Similar to Enumerable#join
Similar to Array#last
, but returns a NilLiteral
if the array is empty.
Similar to Enumerable#map
Similar to Enumerable#map_with_index
Returns the type specified at the end of the array literal, if any.
This refers to the part after brackets in [] of String
.
Similar to Array#push
.
Similar to Enumerable#reduce
Similar to Enumerable#reduce
Similar to Enumerable#reject
Similar to Enumerable#select
Similar to Array#shuffle
Similar to Array#size
Similar to Array#sort
Similar to Array#sort_by
Returns a MacroId
with all of this array's elements joined by commas.
If trailing_string is given, it will be appended to the result unless this array is empty. This lets you splat an array and optionally write a trailing comma if needed.
Returns the type that receives the items of the array.
This refers to the part before brackets in MyArray{1, 2, 3}
Similar to Array#uniq
Similar to Array#unshift
.
© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/Crystal/Macros/ArrayLiteral.html