Skip to main content

Tuple Pattern

rascal-0.34.0

Synopsis

Tuple in abstract pattern.

Syntax

<Pat₁, ..., Patₙ>

Description

A tuple pattern matches a tuple value, provided that Pat₁, Pat₂, ..., Patₙ match the elements of that tuple in order. Any variables bound by nested patterns are available from left to right.

Examples

rascal>import IO;
ok
rascal>if(<A, B, C> := <13, false, "abc">)
>>>>>>> println("A = <A>, B = <B>, C = <C>");
A = 13, B = false, C = abc
ok