I'm trying to do something like this
case class Foo(p: Param)
object Bar {
def apply(implicit p: Param) = Foo(p)
}
def qux(implicit p: Param) {
.. something
val foo: Foo = Bar
.. use foo
}
what I've reached so far is
object Bar {
def apply()(implicit p: Param) = Foo(p)
}
def ... {
val foo: Foo = Bar()
}
Can I do this without parenthesis?