Skip to content

Instantly share code, notes, and snippets.

View aleksandersumowski's full-sized avatar
🤒
-> self-hosted Forgejo

Aleksander Sumowski aleksandersumowski

🤒
-> self-hosted Forgejo
View GitHub Profile

Fibers

Fibers are an abstraction over sequential computation, similar to threads but at a higher level. There are two ways to think about this model: by example, and abstractly from first principles. We'll start with the example.

(credit here is very much due to Fabio Labella, who's incredible Scala World talk describes these ideas far better than I can)

Callback Sequentialization

Consider the following three functions