Skip to content
Pannous edited this page Mar 22, 2022 · 2 revisions

A tuple is a list with fixed length and fixed size. A named tuple is a map with fixed keys, length and size.

Because of these properties addition of tuples is element wise: ( 1 2 3 ) + ( 4 5 6 ) == (5 7 9)

This is an important distinction to lists where {1 2 3 } + { 4 5 6 } == {1 2 3 4 5 6 }

Unlike in some other languages, tuples in angle can be both mutable and immutable (constant final).

x=( 1 2 3 ) x[0]=0 (0 2 3)

record-tuple proposal for JS

https://github.com/tc39/proposal-record-tuple Record, a deeply immutable Object-like structure #{ x: 1, y: 2 } Tuple, a deeply immutable Array-like structure #[1, 2, 3, 4]

Home

Philosophy

data & code blocks

features

inventions

evaluation

keywords

iteration

tasks

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally