### Tuples
[
Datatype tuples
Funcon tuple-elements
Funcon tuple-zip
]
Meta-variables
T1, T2 <: values
T1+, T2+ <: values+
T*, T1*, T2* <: values*
Datatype
tuples(T*) ::= tuple(_:T*)
*/
Funcon
tuple-elements(_:tuples(T*)) : =>(T*)
Rule
tuple-elements(tuple(V*:T*)) ~> V*
Funcon
tuple-zip(_:tuples(values*), _:tuples(values*)) : =>(tuples(values,values))*
*/
Rule
tuple-zip(tuple(V1:T1, V1*:T1*), tuple(V2:T2, V2*:T2*))
~> (tuple(V1, V2), tuple-zip(tuple(V1*), tuple(V2*)))
Rule
tuple-zip(tuple( ), tuple( )) ~> ( )
Rule
tuple-zip(tuple(V1+:T1+), tuple( )) ~> ( )
Rule
tuple-zip(tuple( ), tuple(V2+:T2+)) ~> ( )
/*
`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`.