Two implicits are needed in the function, but I can't have them in the
same parameter list, because I get dependent method type
. So I
considered currying once more, but that gives me a syntax error.
What's the correct way to do this?
def add[A](newAnnotations: Seq[A])
(implicit maybeAdd: MaybeAdd[L, Seq[A]])
(implicit mod: Modifier[maybeAdd.Out, Seq[A], Seq[A]]):
Slab[Content, maybeAdd.Out] = {
val l = maybeAdd(annotations, Seq[A]())
l.updateWith(_ ++ newAnnotations)
}