In the book Scala in Depth . There's this example of implicit scoping as follows:
scala> object Foo {
| trait Bar
| implicit def newBar = new Bar {
| override def toString = "Implicit Bar"
| }
| }
defined module Foo
scala> implicitly[Foo.Bar]
res0: Foo.Bar = Implicit Bar
My question here is how did implicitly find the implementation of the trait Bar in the above given example? I think I am a little confused by how implicitly works