Seqwork and return functions IEnumerable<_>and DefaultIfEmptyand return IEnumerable<_>. How about just wrap it in a function that is composite.
let inline DefaultIfEmpty d l = System.Linq.Enumerable.DefaultIfEmpty(l, d)
It also saves laziness.
Example:
Seq.empty |> DefaultIfEmpty 0
Update
I created an open source library in which many extension methods and statics were added, including Enumerable.defaultIfEmpty- ComposableExtesions
source
share