-
Notifications
You must be signed in to change notification settings - Fork 0
module std.tuple
Jan Špaček edited this page Apr 12, 2016
·
1 revision
Tuples are immutable fixed-size containers that can be used as basic building blocks of more complicated structures. Note that the ,,trivial cases'' of 0-tuples and 1-tuples are well-defined.
-
(tuple? t)
returns true ift
is a tuple (of an arbitrary length). -
(tuple-len t)
returns the length of the tuplet
. -
(tuple-n? n t)
returns true ift
is a tuple withn
elements. -
(tuple-<n>? t)
returns true ift
is a tuple with<n>
elements. Versionstuple-0?
totuple-8?
are provided. -
(tuple-<n> a0 ... a<n>)
makes an<n>
-tuple with elementsa0
, ...,a<n>
. Versionstuple-0
totuple-8
are provided. -
(get-<n> t)
returns<n>
th (zero-based) element of tuplet
(which must contain at least<n> + 1
elements). Versionsget-0
toget-8
are provided.