Skip to Content
Mastering Functional Programming
book

Mastering Functional Programming

by Anatolii Kmetiuk
August 2018
Intermediate to advanced
380 pages
10h 2m
English
Packt Publishing
Content preview from Mastering Functional Programming

Defining, creating, and messaging actors

The actors are defined as classes that inherit from the Actor class from the Akka library:

class HelloWorld extends Actor {

Actor exposes the following abstract API:

The only method that is abstract in Actor is the receive method. Akka calls this method when an actor needs to handle an incoming message. It returns a partial function from Any to Unit. This means that it is capable of handling a message from a domain of all objects, and it is supposed to produce some side effects while handling this message, which is indicated by the Unit return type. That function is a partial function, which means that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781788620796Supplemental Content