Skip to content

Throw

Non-local exit — Throw[val] unwinds until the innermost Catch.

$ wo 'Catch[Throw[42]]'
42
$ wo 'Catch[Do[If[i == 3, Throw[i]], {i, 1, 5}]]'
3