Skip to content

Instantly share code, notes, and snippets.

@rssh
Created September 16, 2014 07:48
Show Gist options
  • Save rssh/40dabb8bc2ad9945dfdc to your computer and use it in GitHub Desktop.
Save rssh/40dabb8bc2ad9945dfdc to your computer and use it in GitHub Desktop.
jdv_article17 (own Do loop)
object Do
{
def apply(body: => Unit) = new DoDody(body)
}
class DoBody(body: => Unit)
{
def until(cond: =>Unit): Unit =
{ body
while(!cond)
body
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment