Closed connorjacobsen closed 8 years ago
The v0.2-alpha
List
doesn't have to exactly match the spec. The basic functionality should be there, but the pretty syntax isn't required yet.
I am satisfied that the LLVM representation for this structure is implemented for a v1.
List
Iris lists are denoted by square brackets.
[]
is the empty list. Lists are strongly-typed containers, and all elements of a list must be of the same type.Examples:
We can prepend values to lists with the
:
operator:Placing values inside of the square brackets is really just syntactic sugar for prepending each of the values to empty list. The above list is equivalent to the following:
The type of this list is
[Int]
.Lists may be concatenated with the
++
operator: