A simple return type to manage dependencies and logging

This is a tiny library with the primary goal to create a standard return type that handles errors and logging (for motivation see my ny-scala talk)


First, import the library

import result._
import scala.concurrent.Future

create an error type (or use an existing one), a simple ADT should do it

sealed trait MyError
final case class ConnectionError(msg: String) extends MyError
final case class DataConsistencyError(id: Int) extends MyError 

if you need a state, create it, otherwise just use Unit

final case class MyState(connections: Int)

now you can create your own Return type

type MyReturn[A] = ResultT[Future, MyState, MyError, A]

more to follow...