title: Defining a Map from String to Function in Scala
body: <p>I am trying to define a Map literal with key: <code>String</code>, value: <code>(Any)=&gt;String</code>. I tried the following, but get a syntax error:</p>
  
  <pre><code>def foo(x: Int): String = /...
  def bar(x: Boolean): String = /...
  val m = Map[String, (Any) =&gt; String]("hello" -&gt; foo, "goodbye" -&gt; bar)
  </code></pre>