I am trying to figure out some Scala code. Here's a snippet that creates an mutable Map and Ordering object.
import scala.collection.mutable
val score = mutable.Map(start -> 0d) withDefaultValue Double.PositiveInfinity
val priority = Ordering by {n: Node => score(n) + heuristic(n)}
What do you call this code where you just put terms after an expression without commas or parenthesis? I have a feeling this is the functional aspect of Scala but not sure. Do the curly brackets have a different meaning in this context?