FSharpPlus icon indicating copy to clipboard operation
FSharpPlus copied to clipboard

Add functions for Nullable<_>

Open gusty opened this issue 5 years ago • 5 comments

I think at least Option.ofNullableshould be added.

@mausch did a whole module some years ago, I don't think we should add all of them. Remember that Nullable are restricted to non value types, so things like Option.map would break.

gusty avatar Aug 26 '19 16:08 gusty

Option.ofNullable has been part of FSharp.Core for some time now.

cmeeren avatar Sep 03 '19 06:09 cmeeren

Thanks, for some reason I didn't realize it was already there. So I would say let's have a look at the other functions and if there's nothing interesting to add, that justify that module, we can close this issue.

gusty avatar Sep 03 '19 09:09 gusty

What about Nullable.ofOption for going from option to a Nullable<> type?

wallymathieu avatar Oct 20 '21 17:10 wallymathieu

There's Option.toNullable built-in.

cmeeren avatar Oct 20 '21 18:10 cmeeren

Thanks @cmeeren

wallymathieu avatar Oct 20 '21 18:10 wallymathieu