polyadic / funcky

Funcky is a Functional Library for C#
https://polyadic.github.io/funcky
Apache License 2.0
19 stars 4 forks source link

collection expressions for Option<T> #760

Open FreeApophis opened 1 year ago

FreeApophis commented 1 year ago

Since we have the pattern match for Option [var value] with C#12 the question is: should an Option<T> be constructible with a collection expression too?

Open questions.

What would we need to do?

Implement the Collection Builder as described here: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/collection-expressions