Experimenting with functional core, imperative shell in an iOS app.