Experimenting with FRP to avoid explicit state.

I have no idea whether the approach used in this test is actually any good.