Advertisement
Guest User

Untitled

a guest
Mar 18th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.15 KB | None | 0 0
  1. trait RepeatUntil {
  2.   def repeat(f: => Unit)(condition: => Boolean): Unit = {
  3.     if (!condition) {
  4.       f
  5.       repeat(f)(condition)
  6.     }
  7.   }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement