title: How to call a function wrapped in a TaskKey?
body: <p>I have a <code>TaskKey[String =&gt; String]</code> and would like to apply the function on a provided string. I am trying the following, with string &quot;foo&quot;:</p>
  <pre class="lang-scala prettyprint-override"><code>val x = Project.extract(state)
  import x._
  val task: TaskKey[String =&gt; String] = ...
  val taskFunc = task in currentRef get structure.data // Option[Task[String =&gt; String]]
  val taskValue = taskFunc.map(_.value.apply(&quot;foo&quot;)).getOrElse(&quot;foo&quot;) // String
  </code></pre>
  <p>I get an error because of the call to <code>_.value</code>.</p>