NetLogo/Tortoise — pull request #109 by mrerrormessage (2014-12-19 19:58:12+00:00)
Title: Ineffectual calls to `report` in NetLogo control structures

`repeat` and `every` have the ability for their command blocks to cause an early exit via `report`, but this "early exit" functionality does not currently propagate out the reported value in Tortoise. `if`, `while`, and `loop` also have this same property, but it works out fine because we write an inline JavaScript `if`/`while` statement, rather than making a function call to the engine. `carefully` will also need to be able to handle this.

I can immediately think of some hacky ways of addressing the problem—checking that the output of `every` and company isn't `undefined`; writing these constructs at inline (like `if` and the others do)—but it should be given some consideration for elegant solutions.