Skip to main content

Visit

rascal-0.34.0

Synopsis

The Visit expression can also be used directly as a statement

Syntax

See Visit.

Description

See Visit for the details.

Examples

rascal>x = [[1],[2],[3]];
list[list[int]]: [
[1],
[2],
[3]
]
rascal>if (true) {

this visit is a nested statement in an if block:

>>>>>>>  visit (x) {
>>>>>>> case int i => i + 1
>>>>>>> }
>>>>>>>}
list[list[int]]: [
[2],
[3],
[4]
]