concept nutshell in category .net
appears as: nutshell

This is an excerpt from Manning's book Concurrency in .NET.
The F#
AsyncResult.handleris a powerful operator that dispatches the execution flow in case of error. In a nutshell, theAsyncResult.handlerruns theAsync.Catchfunction in the background for error handling and uses theofChoicefunction to map the product of the computation (Choice<Choice1Of2, Choice2Of2> Discriminated Union) to theResult<'a>DU cases, which then branch the result of the computation respectively to theOKorErrorunion. (ofChoicewas introduced in chapter 9.)