pair


pair(a, b)
      

Return a new pair whose head is the object a and whose tail is the object b.

A pair can also be constructed by using the : operator as in, a:b.

The form a: will create the pair a:void. This form is useful for specifying spliced indices into lists and arrays.

Examples:


pair(3, 4)
// 3:4

pair(3, pair(4, 5))
// 3:4:5

pair(3, 4:(5:[]))
// [3, 4, 5]
      

Also see:

is_pair
car
cdr
first
rest


Core Module Index | Contents