-
-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Hi,
how can define function with varargs ?
b can not be A*, does works with List[A]. Any idea how to make it works? Thanks
@typeclass trait CanTruthy[A] { self =>
/** Return true, if a is truthy. /
def truthy(a: A, b: A): Boolean
}
object CanTruthy {
def fromTruthy[A](f: A => Boolean): CanTruthy[A] = new CanTruthy[A] {
def truthy(a: A, b: A*): Boolean = f(a)
}
}
ivan-klass and DarrenBishop
Metadata
Metadata
Assignees
Labels
No labels