varargs parameter as type parameter?
Posted
by IttayD
on Stack Overflow
See other posts from Stack Overflow
or by IttayD
Published on 2010-06-16T11:11:31Z
Indexed on
2010/06/16
11:42 UTC
Read the original article
Hit count: 195
scala
Is there any way to create something similar to this:
class F[A] {def apply(a: A) = println(a)}
So that I can:
(new F[Int*])(1,2,3)
UPDATE: but otherwise, I want F to accept normal parameters:
(new F[Int])(1)
© Stack Overflow or respective owner