When you pass an anonymous function to another function or method, Scala helps you out by deducing types when possible. For example, you don’t have to write
valueAtOneQuarter((x: Double) => 3 * x) // 0.75
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.