This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Kernel { | |
implicit class Times(val n: Int) extends AnyVal { | |
def times[T](block: => T) = for (i <- 1 to n) yield block | |
def times[T](block: Int => T) = for (i <- 1 to n) yield block(i) | |
} | |
implicit class RunnableConversion(block: => Unit) extends Runnable { | |
def run = block | |
} |