Duplicates and naming
Hi,
First of all, thank you for this helpful library.
I'd like to report here a duplication of the same method with 3 names (ofBoolAndValue, fromTryPattern, tryParseWith). let a = Double.TryParse "2" |> Option.ofBoolAndValue let b = Option.fromTryPattern Double.TryParse "2" let c = Option.tryParseWith Double.TryParse "2"
Also, I was wondering if you should not rename the Option.concat to Option.flatten or Option.switch (to look like Observable.switch) because the name is quite misleading and actually doesn't concat some options.
Cheers
Good point about those duplicate functions. Too many people contributing without discussing things I guess.
About Option.concat, it's the same concept as the built-in List.concat i.e. m (m a) -> m a
Don't know how you want to handle things but if you need some help, feel free to ask/contact me.
4th variant:
let d = Double.TryParse "2" |> toOption
https://github.com/fsprojects/FSharpx.Extras/blob/master/src/FSharpx.Extras/Prelude.fs#L89-L92