Skip to content

Instantly share code, notes, and snippets.

@zcox
Created March 22, 2017 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zcox/6258713ec73c72db18c9faf39c6ca47c to your computer and use it in GitHub Desktop.
Save zcox/6258713ec73c72db18c9faf39c6ca47c to your computer and use it in GitHub Desktop.
trait ThingRepository {
def findThing(id: String): Try[Option[Thing]]
}
trait ThingService extends ThingRepository {
def doSomething(id: String): Unit = {
findThing(id) //then do something else...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment