fsharp/fsharpx — pull request #226 by CarstenKoenig (2013-06-05 09:40:03+00:00)
Title: Haskell style maybe operator in prelude

I really like Haskells maybe operator (see http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:maybe) so I added it to the prelude.

In case you do not know it - you can think of it as a "Default-Value-For-Option":
```fsharp
let maybe (defaultValue : 'b) (map : 'a -> 'b) = function
| None -> defaultValue
| Some a -> map a
```
and a example could be:
```fsharp
let absOrZero = maybe 0 abs
absOrZero None // <- yields 0
absOrZero (Some -5) // <- yields 5
```