I've been trying my best to understand the underscore syntax and I've found various threads involving this but I'm still unclear on one use:
I see this in Odersky's book (pg 150 and 151 in Version 3)
someNumbers.foreach(println _)
Apparently this replaces an entire parameter list? I don't see how this is different from a normal placeholder. It goes on to say that this is not a placeholder for a single parameter... it is a placeholder for an entire list. This is unclear to me. How is this different from a placeholder?
Is this the same concept:
def add(x: Int, y: Int) = x + y
val addFunction = add _
// Does this just copy the parameter list?
addFunction(1,2)