Skip to content

Instantly share code, notes, and snippets.

@markhibberd
Created February 24, 2013 09:23
Show Gist options
  • Select an option

  • Save markhibberd/5023220 to your computer and use it in GitHub Desktop.

Select an option

Save markhibberd/5023220 to your computer and use it in GitHub Desktop.
Scala-syd abstract.

Patterns in Types: Reader, Writer, State in Scala

Developers are often very good at spotting repetition in their programs at the value level, but for some reason struggle, or are reluctant to, apply that same careful analysis at the type level.

This talk aims to build up an intuition for spotting when you can factor your types, examining what this gains you, and looking at the practicalities for doing so in scala. We will use an example of building out a simple web stack using reader, writer and state. The code demonstrated is based closely on a tried and tested purely functional web stack currently in production.

For appropriate buzz-word compliance during this talk you will see scalaz, monads, monad transformers, data types, type classes and laws.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment