Emulate F# active pattern matching
Closed this issue · 0 comments
JYCabello commented
Make a .MatchWith extension that takes tuples with: one predicate returning option T and one function processing T, as a last parameter, one function taking the original type (default).
The first matching predicate will apply its paired function, if no predicate matches, it will run the default function.