But (unless you're learning) nobody does that. Is not idiomatic and
is unnecessary.
As Kevin said, you just do p.map ( process(_) ), there's no need to touch
process's code
On Sunday, June 3, 2012 11:43:48 PM UTC-3, Cédric Beust ♔ wrote:
>
> ...
>
> Option[String] p = req.getParameter("foo")
> p match {
> case Some(s) : process(s)
> case None: _
> }
>
> You have gained nothing (I touched on this particular scenario in this
> blog
> post<http://beust.com/weblog/2010/07/28/why-scalas-option-and-haskells-maybe-types-wont-save-you-from-null/>
> ).
>
> ...
> --
> Cédric
>
>
>
--
You received this message because you are subscribed to the Google Groups "Java
Posse" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/javaposse/-/5xmK2GjiN9UJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.