Top Stories published by theburningmonk.com in January of 2012

F# — Retry workflow

After reading this old post by Don Syme, I really liked the idea of wrapping the result of any computation into an option type to signify success and failure cases and stop subsequent computations on the first failure. It’s neat but I wanted to tweak a couple of things to make it more useful:


Checked context in C# and F#

C#

By default, arithmetic operations and conversions in C# execute in an unchecked context, you can use the checked keyword to switch a block of code to the checked context so that any arithmetic overflow that occurs in that block of code will cause…