flatMappy bird follow up material
The aim of my talk was to give:
- A feeling for how FRP, and Coroutines work
- Pride in functional programming
- A couple of hints about what to look at if it peaked your interest
Here are a few things to point you towards the latter!
The flatMappy bird project was based on 2 articles:
- Generalizing streams into Coroutines
- Purely Functional, Declarative Game Logic Using Reactive Programming
As you can probably guess, I found these absolutely fascinating - and I highly recommend you check them out!
There is also a Scala Coroutines library. I have not tried to build anything with this yet, but the documentation looks great - and it's fully featured. Definitely worth a look.
Episode 7 of Breakpoint Radio also has some great discussion of Coroutine development in Scala and on the JVM.
The place to go is Li Haoyi's Hands on Scala.js. Whilst you're there, check out the rest of his website - it's a treasure trove.
flatMappy bird itself
Implement "Hello World" with a Coroutine yourself, to understand the concept:
There is a time varying String value that we can sample. We want to transform it to a time varying Boolean:
- The latest value of the String is "World" AND
- The previous value of the String was "Hello"
Here's some code to get you started:
This will be easy if you read Generalizing streams into Coroutines.