Skip to content

Instantly share code, notes, and snippets.

Created May 10, 2012
What would you like to do?
Binding implicits
trait CacheContext
trait Cache {
def lookup(query: String)(implicit context: CacheContext): String
def store(id: String, value: String)(implicit context: CacheContext): Unit
class BoundCache(private val delegate: Cache)(implicit private val context: CacheContext) {
def lookup(query: String): String =
def store(id: String, value: String): Unit =, value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment