Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Until{
- var expr_cache: Boolean = false;
- def until(expression: => Boolean)(code: => Unit) = {
- expr_cache = expression
- while (expression)code
- this
- }
- def els(code: => Unit): Unit = if (!expr_cache)code
- }
Advertisement
Add Comment
Please, Sign In to add comment