Allow collections to be defined by literals.
Literal defined collections are always immutable. however immutable collections can be assigned to mutable ones. This uses the implicit constructor mechanic to copy the immutable collection to the mutable one
Sequence a = [2, 4, -5, 6, 7];
Array a = [2, 4, -5, 6, 7];
Allow collections to be defined by literals. Literal defined collections are always immutable. however immutable collections can be assigned to mutable ones. This uses the implicit constructor mechanic to copy the immutable collection to the mutable one
Sequence a = [2, 4, -5, 6, 7];
Array a = [2, 4, -5, 6, 7];
Association<String, String> family = { "mom": "Carol" , "dad": "Steven" , "son": "Geroge" }; Map<Natural, String> numbers = { 1 : "One" , 2 : "Two" };
// Tuples (String , Integer) pair = ("Route" , 66 ); (String , Integer, Boolean ) pair = ("Route" , 66 , true );