org.specs2.control
This trait can be used to allow some function to be called with varargs, with values being evaluated lazily:
def method[T](values: LazyParameter[T]*) = { values.toStream // use the toStream method to consume the values lazily } // usage method(exp1, exp2, exp3)
Note that the values are really evaluated once, unlike a by-name parameter.
transform a value to a zero-arg function returning that value
This trait can be used to allow some function to be called with varargs, with values being evaluated lazily:
Note that the values are really evaluated once, unlike a by-name parameter.