The foundational compound data type of Scheme is the pair. As might be expected from its name, a pair is two values glued together. The operator used to form a pair is called cons.

guile> (cons 4 5)
(4 . 5)

Note that the pair is displayed as two items surrounded by parentheses and separated by whitespace, a period (.), and more whitespace. The period is not a decimal point, but rather an indicator of the pair.

Pairs can also be entered as literal values by preceding them with a single quote character.

guile> '(4 . 5)
(4 . 5)

The two elements of a pair may be any valid Scheme value:

guile> (cons #t #f)
(#t . #f)
guile> '("blah-blah" . 3.1415926535)
("blah-blah" . 3.1415926535)

The first and second elements of the pair can be accessed by the Scheme procedures car and cdr, respectively.

guile> (define mypair (cons 123 "hello there")
… )
guile> (car mypair)
guile> (cdr mypair)
"hello there"

Note: cdr is pronounced "could-er", according Sussman and Abelson, see

Extending LilyPond v2.25.18 (development-branch).