PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Lists

< >
const list = [1,2,3]
Example from Python, Cython:
myList = [1, 2, 3, 4, 5]
[1, 2, 3]
Example from Go:
myList := []int{1, 2, 3}
Example from Elixir:
my_list = [1, 2, 3, 4, 5]
Example from REBOL, Boron:
my-list: [1 two 3.0 "four"]
Example from Ion:
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
Example from Bel:
; here is a list of a, b, and c: (a . (b . (c . nil))) ; can be written as (a b c)
[1 2]
Example from BALGOL:
ARRAY MONTHDAYS(12) = (31,28,31,30,31,30,31,31,30,31,30,31)$
Example from Lil:
emptyList = ()

Languages with Lists include JavaScript, Python, JSON, Go, TypeScript, Elixir, GraphQL, REBOL, EDN, JSON5, Cython, Ion, janet, Bel, JSONiq, JSON with Comments, Superjson, Hocon, Jsonnet, Boron, Uniform eXchange Format, BALGOL, Lil, fp, hecl, Static Typescript

Languages without Lists include progsbase

Read more about Lists on the web: 1.

HTML of this page generated by Features.ts

hasLineComments.html 路 hasLists.html 路 hasMacros.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com