45 ms·
For sure. I'm just speaking in relative terms. Scala makes it really easy to write seriously complex code and types. You end up with fun stuff like this: def
by rco8786 12y ago
For sure. I'm just speaking in relative terms. Scala makes it really easy to write seriously complex code and types.
You end up with fun stuff like this:
def map[U](f: T => U): Group[U] = collect { case e => f(e) }
implicit def canStackFromFac[Req, Rep]
: CanStackFrom[Filter[Req, Rep, Req, Rep], ServiceFactory[Req, Rep]] =
new CanStackFrom[Filter[Req, Rep, Req, Rep], ServiceFactory[Req, Rep]] {
def toStackable(_role: Stack.Role, filter: Filter[Req, Rep, Req, Rep]) =
new Stack.Simple[ServiceFactory[Req, Rep]] {
val role = _role
val description = role.name
def make(next: ServiceFactory[Req, Rep])(implicit params: Params) = filter andThen next
}
}
- cheepin 12y agoBut look what you can do with two lines of code!!!!!!111