February 2018
Intermediate to advanced
552 pages
13h 46m
English
In Scala, a combinator is a Higher-Order Function and also a pure function.
As they are pure functions, we can easily compose them together very well as flexible, fine-grained building blocks for constructing larger, more complex programs.
Some of the frequently used Scala combinators are as follows:
Like the try...catch block in sequential programming, Future has the Future.recover block for asynchronous programming. If you are new to Scala Futures, please refer to Chapter 3, Asynchronous Programming with Scala:
def recover(pf: PartialFunction[Throwable, T]) (implicit e: ExecutionContext): Future[T]
It is also a Scala combinator. We will discuss some Scala combinators, ...
Read now
Unlock full access