Chris Birchall
http://lambdale.org/
@lambd_ale
1st September 2018
theory
practice
Kan
extensions
corepresentable functors
Monads
Yoneda lemma
Type classes
Kleisli
StateT
"build a working, well-tested, maintainable piece of software to deliver business value"
Somebody told me to use free monads,
but somebody else told they were passé
Should this thing be a class or an object?
Is it ok to use traits?
I don't even know what my package structure
should look like
Am I doing it right?
Is FP actually better than the alternatives?
Don't FP and OOP boil down to the same thing anyway?
But one or the other might still be
a better tool for the job
Photo storage service
User can upload a photo and get back a unique ID
User can retrieve a photo by ID
Domain
Translation
External world
Pure
Impure
External world
Abstract
Concrete
External world
api
application
domain
infrastructure
HTTP controllers
Concrete effects, interpreters
Domain models and algebras
HTTP clients, config loading, ...
Expected errors
def validate(input: Foo): IO[Either[ValidationError, Bar]]
✓ Local reasoning
✓ Abstraction
✓ Composition