--- layout: default title: "Tuples" parent: Composite ancestor: Funcons-beta --- [Funcons-beta] : [Tuples.cbs] ----------------------------- ### Tuples
[
Datatype tuples
Funcon tuple-elements
Funcon tuple-zip
]Datatype
tuples(T*) ::= tuple(_:T*)T* can be any sequence of types, including ( ) and values*.
The values of type tuples(T1, ..., Tn) are of the form tuple(V1, ..., Vn)
with V1:T1, ..., Vn:Tn.
Funcon
tuple-elements(_:tuples(T*)) : =>(T*)
Rule
tuple-elements(tuple(V*:T*)) ~> V*tuple-zip(TV1, TV2) takes two tuples, and returns the sequence of pairs of
their elements, provided that they have the same length. If they have
different lengths, the last elements of the longer sequence are ignored.
____
From the [PLanCompS Project] | [CBS-beta issues...] | [Suggest an improvement...]
[Tuples.cbs]: Tuples.cbs
"CBS SOURCE FILE"
[Funcons-beta]: /CBS-beta/docs/Funcons-beta
"FUNCONS-BETA"
[Unstable-Funcons-beta]: /CBS-beta/docs/Unstable-Funcons-beta
"UNSTABLE-FUNCONS-BETA"
[Languages-beta]: /CBS-beta/docs/Languages-beta
"LANGUAGES-BETA"
[Unstable-Languages-beta]: /CBS-beta/docs/Unstable-Languages-beta
"UNSTABLE-LANGUAGES-BETA"
[CBS-beta]: /CBS-beta "CBS-BETA"
[PLanCompS Project]: https://plancomps.github.io
"PROGRAMMING LANGUAGE COMPONENTS AND SPECIFICATIONS PROJECT HOME PAGE"
[CBS-beta issues...]: https://github.com/plancomps/CBS-beta/issues
"CBS-BETA ISSUE REPORTS ON GITHUB"
[Suggest an improvement...]: mailto:plancomps@gmail.com?Subject=CBS-beta%20-%20comment&Body=Re%3A%20CBS-beta%20specification%20at%20Values/Composite/Tuples/Tuples.cbs%0A%0AComment/Query/Issue/Suggestion%3A%0A%0A%0ASignature%3A%0A
"GENERATE AN EMAIL TEMPLATE"