Skip to main content

Visit

rascal-0.41.2

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:

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