Changes

Jump to navigation Jump to search
13 bytes added ,  08:54, 19 July 2022
<syntaxhighlight lang="xquery">
for $a in 1 to 510
for $b in 2
where $a > 3
(: for is rewritten to let :)
for $a in 1 to 510
let $b := 2
where $a > 3
(: let is lifted up :)
let $b := 2
for $a in 1 to 510
where $a > 3
let $c := $a + $b
(: the where expression is rewritten to a predicate :)
let $b := 2
for $a in (1 to 510)[. > 3]
let $c := $a + $b
return $c
(: $b is inlined :)
for $a in (1 to 510)[. > 3]
let $c := $a + 2
return $c
(: $c is inlined :)
for $a in (1 to 510)[. > 3]
return $a + 2
(: the remaining clauses are merged and rewritten to a simple map :)
(1 to 510)[. > 3] ! (. + 2)
</syntaxhighlight>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu