I would like to know, which is the difference between these:
object Something {
def apply(op: => Unit) {}
}
and this:
object Something {
def apply(op:() => Unit) {}
}
because when I call them, it requires me to write:
- in first case:
Something { afunction() }
- in second case:
Something { () => afunction() }