PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Lists

Lists

Lists are a feature.

A list or sequence is an abstract data type that represents a countable number of ordered values, where the same value may occur more than once


Languages with Lists include JavaScript, Python, JSON, Go, Elixir, GraphQL, REBOL, EDN, Ion, Boron

Example from JavaScript:
const list = [1,2,3]
Example from Python:
myList = [1, 2, 3, 4, 5]
Example from JSON:
[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
union-types-feature.html 路 lists-feature.html 路 access-modifiers-feature.html

View source

PLDB - Build the next great programming language 路 v2022 Day 33 Docs Build Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com