I just realize that these combiners can be defined more succintly as:

1
2
3
4
5
6
7
/// Like |>, except returns None if given None
let (|?>) a f =
   a |> Option.map f

/// Like |?>, but for use when f already returns an option
let (|?>>) a f =
   a |> Option.bind f

I guess that makes them more cryptic than useful :)

By on 2/27/2008 9:58 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper