Code, rants and ramblings of a programmer.
Browse by Tags
Tagged Content List
Functional C#: Providing an Option Part 2
In my previous post I discussed creating an Option style construct for C#/.Net. This post is a followup with the complete code snippet. It’s been updated in response to several bits of feedback I received. Namely Option is now a struct vs. class Added equality metrics Allowing implicit...
8 Oct 2008
F# has a handy method called Unfold. Think of it as the logical opposite of an Aggregate function. Aggregates take a sequence of elements and convert them to a single element. An unfold method will take a single element and turn it into a (potentially infinite) sequence of elements...
7 Oct 2008
Functional C#: Providing an Option
Sorry for the terrible pun in the title. I wanted to blog about developing an F# style Option class for C# and I couldn't resist. The basics of an Option class are very straight forward. It's a class that either has a value or doesn't. It's almost like nullable but for every type and...
6 Oct 2008
Page 1 of 1 (3 items)
© 2015 Microsoft Corporation.
Privacy & Cookies