title: Mapping Spray Parameters
body: <p>I am trying to build a simple API to understand Spray's capabilities and already am stuck by mapping parameters to real types.  I have the following code which fails to compile but I'm using it as documented in Spray's own documentation:</p>
  
  <pre><code>  val myRoute =
      pathPrefix("people") {
        path("nearby") {
          parameters('lat as[Double], 'lng as[Double]).as(Location) { location =&gt;
            complete {
              locationWorker ! location
            }
          }
        }
      }
  </code></pre>
  
  <p>The error I receive is </p>
  
  <p>[error] /.../MyService.scala:47: ')' expected but '[' found.
  <br />[error]         parameters('lat as[Double], 'lng as[Double]).as(Nearby) { lat =></p>
  
  <p>It's worth mentioning I am somewhat new to Scala as well so I could easily be doing something very simple wrong.</p>