Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varargs does not works #113

Open
clives opened this issue Sep 28, 2018 · 2 comments
Open

varargs does not works #113

clives opened this issue Sep 28, 2018 · 2 comments

Comments

@clives
Copy link

clives commented Sep 28, 2018

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)
}
}

@DarrenBishop
Copy link

@clives raising a PR

@DarrenBishop
Copy link

Raised #236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants