Core concept
def pure(x: Int) = x + 1 // RT
def impure(x: Int) = { println(x); x } // not RT (side effect)Advertisement
How it works
Side effects break RT. Encode them as data (IO type).
Advertisement
Trade-offs + gotchas
FP-idiomatic Scala. Reasoning about programs.