Ask HN: Separate Logic from IO
In functional programming, to what extent it is practical to separate Logic from IO ? How to combine them effectively ?
For example, https://sans-io.readthedocs.io/ (and its accompanying talk https://www.youtube.com/watch?v=7cC3_jGwl_U) give some really great brainfood about the way currently all kinds of network protocols are implemented, and the benefits of separating the protocol (Logic) from the actual implementation (IO).
You might also want to query Google or DDG for "Free monads" if you want to implement a similar layered approach in a functional language such as Scala or Haskell.
https://www.destroyallsoftware.com/talks/boundaries is a great, practical talk about this.