const list = [1,2,3]
myList := []int{1, 2, 3}
my_list = [1, 2, 3, 4, 5]
null.list // A null list value
[] // An empty list value
[1, 2, 3] // List of three ints
[ 1 , two ] // List of an int and a symbol
[a , [b]] // Nested list
[ 1.2, ] // Trailing comma is legal in Ion (unlike JSON)
[ 1, , 2 ] // ERROR: missing element between commas
; here is a list of a, b, and c:
(a . (b . (c . nil)))
; can be written as
(a b c)
emptyList = ()
[1 2]
ARRAY MONTHDAYS(12) = (31,28,31,30,31,30,31,31,30,31,30,31)$
Languages with Lists include JavaScript, Python, JSON, Go, TypeScript, Elixir, GraphQL, REBOL, EDN, JSON5, Cython, Speedie, Ion, janet, Bel, JSONiq, JSON with Comments, Superjson, Jsonnet, Hocon, Lil, Uniform eXchange Format, Boron, BALGOL, fp, hecl
Languages without Lists include progsbase
This question asks: Does the language have lists?
Read more about Lists on the web: 1.
HTML of this page generated by Features.ts