title: How to pass implicit value to a function?
body: <p>I am new to <code>scala</code>. I am learning <code>implicit variables</code>. How can a pass an implicit variable to a function that calls another function that is gonna use that variable. I know this question seems stupid. Just look at the code that I have written.</p>
  
  <pre><code>class Person{
  
      def whoAmI(implicit name: String): Unit = {
          println(s"I am $name")
      }
  }
  
  class NewPerson{
      def whoAmI: Unit = {
          val p: Person = new Person
          p.whoAmI
      }
  }
  
  object Main extends App {
      implicit val name: String = "a Shamir"
      val person: NewPerson = new NewPerson
      person.whoAmI
  }
  </code></pre>
  
  <p>This code doesn't work. But this does.</p>
  
  <pre><code>class Person{
  
      def whoAmI(implicit name: String): Unit = {
          println(s"I am $name")
      }
  }
  
  class NewPerson{
      implicit val name: String = "a Shamir"
      def whoAmI: Unit = {
          val p: Person = new Person
          p.whoAmI
      }
  }
  
  object Main extends App {
      val person: NewPerson = new NewPerson
      person.whoAmI
  }
  </code></pre>
  
  <p>I want something like this.</p>
  
  <pre><code>class Person{
  
      def whoAmI(implicit name: String): Unit = {
          println(s"I am $name")
      }
  }
  
  class NewPerson{
      def whoAmI: Unit = {
          val p: Person = new Person
          p.whoAmI
      }
  }
  
  object Main extends App {
      implicit val name: String = "a Shamir"
      val person: NewPerson = new NewPerson
      person.whoAmI()(name)
  }
  </code></pre>
  
  <p>Is it possible?</p>