<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Entries tagged with monads - Channel 9</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/tags/monads/feed/zune/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Entries tagged with monads - Channel 9</title><link>http://channel9.msdn.com/tags/Monads/</link></image><description>monads</description><link>http://channel9.msdn.com/tags/Monads/</link><language>en-us</language><pubDate>Wed, 01 Jul 2009 22:21:44 GMT</pubDate><lastBuildDate>Wed, 01 Jul 2009 22:21:44 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>Expert to Expert: Brian Beckman and Erik Meijer - Inside the .NET Reactive Framework (Rx)</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_small_ch9.png" border="0" /&gt;Erik Meijer and team (developer Wes Dyer, in particular) have created a profound and beautiful .NET library that will take managed event based programming to new levels. Of course, many of you wish that you could write LINQ expressions over events. Well, now you can thanks to Erik's and Wes Dyer's latest creation, Rx - .NET Reactive Framework. Erik, being a fundamentalist functional theoritician, can't create new programming abstractions without employing some form of monadic magic. &lt;br /&gt;
&lt;br /&gt;
Enter astrophysicist and monadic composition wizard Brian Beckman. The &lt;a href="http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Expressing-State-The-State-Monad/" target="_blank"&gt;last time Brian was on C9 he taught us about the State Monad&lt;/a&gt;. At the end of that discussion he mentioned he wanted to teach us about the Continuation Monad next. So, who better to conduct this episode of Expert to Expert than Dr. Beckman? Yep. You guessed it! Rx employs the Continuation Monad in its composition. Erik is in the hot seat this time and it's always a real pleasure to converse with Erik and Brian in the same room at the same whiteboard. &lt;br /&gt;
&lt;br /&gt;
Now, what is Rx?&lt;br /&gt;
&lt;br /&gt;
The .NET Reactive Framework (Rx) is the &lt;a href="http://en.wikipedia.org/wiki/Dual_(category_theory)"&gt;mathematical dual&lt;/a&gt; of &lt;a href="http://msdn.microsoft.com/en-us/library/bb397919.aspx"&gt;LINQ to Objects&lt;/a&gt;. It consists of a pair of interfaces IObserver/IObservable that represent push-based, or &lt;i&gt;observable&lt;/i&gt;, collections, plus a library of extension methods that implement the &lt;a href="http://research.microsoft.com/en-us/um/people/emeijer/Papers/LINQSigmod.pdf"&gt;LINQ&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/bb397896.aspx"&gt;Standard Query Operators&lt;/a&gt; and other useful stream transformation functions.&lt;br /&gt;
&lt;br /&gt;
interface IObservable&amp;lt;out T&amp;gt; &lt;br /&gt;
{      &lt;br /&gt;
    IDisposable Subscribe(IObserver o); &lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
interface IObserver&amp;lt;in T&amp;gt;  &lt;br /&gt;
{     &lt;br /&gt;
    void OnCompleted();     &lt;br /&gt;
    void OnNext(T v);      &lt;br /&gt;
    void OnError(Exception e); &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
Observable collections capture the essence of the well-known &lt;a href="http://en.wikipedia.org/wiki/Observer_pattern"&gt;subject/observer design pattern&lt;/a&gt;, and are tremendously useful for dealing with event-based and asynchronous programming, i.e. &lt;a href="http://dotnetaddict.dotnetdevelopersjournal.com/volta_ajax_tums.htm"&gt;AJAX-style applications&lt;/a&gt;. For example, here is the prototypical &lt;a href="http://www.objectgraph.com/dictionary/how.html"&gt;Dictionary Suggest&lt;/a&gt; written using LINQ query comprehensions over observable collections:&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;IObservable&amp;lt;Html&amp;gt; q = from fragment in textBox&lt;/p&gt;
&lt;p&gt;               from definitions in Dictionary.Lookup(fragment, 10).Until(textBox)&lt;/p&gt;
&lt;p&gt;               select definitions.FormatAsHtml();&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;q.Subscribe(suggestions =&amp;gt; { div.InnerHtml = suggestions; })&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
Please subscribe to this Channel 9 interview to be notified when we have clearance to distribute Rx over the counter (lame puns intended :-). &lt;br /&gt;
&lt;br /&gt;
Tune in. This should prove to be an instant classic besides being a very important episode of E2E. Rx is deep, man. Deep.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://channel9.msdn.com/476591/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Brian-Beckman-and-Erik-Meijer-Inside-the-NET-Reactive-Framework-Rx/</comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Brian-Beckman-and-Erik-Meijer-Inside-the-NET-Reactive-Framework-Rx/</link><pubDate>Thu, 09 Jul 2009 18:36:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_2MB_ch9.wmv</guid><evnet:views>87890</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/476591/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Erik Meijer and team (developer Wes Dyer, in particular) have created a profound and beautiful .NET library that will take managed event based programming to new levels. Of course, many of you wish that you could write LINQ expressions over events. Well, now you can thanks to Erik's and Wes Dyer's latest creation, Rx - .NET Reactive Framework. Erik, being a fundamentalist functional theoritician, can't create new programming abstractions without employing some form of monadic magic. Enter astrophysicist and monadic composition wizard Brian Beckman as this E2E episode's chief inquisitor. Erik is in the hot seat this time and it's always a real pleasure to converse with Erik and Brian in the same room at the same whiteboard.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_large_ch9.png" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_small_ch9.png" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_ch9.mp4" expression="full" duration="4383" fileSize="432582360" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_ch9.mp3" expression="full" duration="4383" fileSize="35068461" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_ch9.mp4" expression="full" duration="4383" fileSize="432582360" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_ch9.wma" expression="full" duration="4383" fileSize="70908401" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_ch9.wmv" expression="full" duration="4383" fileSize="614943741" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_2MB_ch9.wmv" expression="full" duration="4383" fileSize="1372208237" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_Zune_ch9.wmv" expression="full" duration="4383" fileSize="621407721" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/9/5/6/7/4/E2EBeckmanMeijerRx_2MB_ch9.wmv" length="1372208237" type="video/x-ms-wmv" /><dc:creator>Charles</dc:creator><slash:comments>52</slash:comments><wfw:commentRss>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Brian-Beckman-and-Erik-Meijer-Inside-the-NET-Reactive-Framework-Rx/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/476591/Trackback.aspx</trackback:ping><category>Brian Beckman</category><category>Erik Meijer</category><category>Expert to Expert</category><category>Monads</category><category>Programming</category><category>Reactive Extensions</category><category>Reactive Framework</category><category>Rx</category></item><item><title>Brian Beckman: The Zen of Stateless State - The State Monad - Part 2</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_small_ch9.jpg" border="0" /&gt;Concurrency is a problem that faces all developers as we move to the age of ManyCore processor architectures. Managing state is an important aspect of programming generally and for parallel programming especially. The great &lt;a href="http://channel9.msdn.com/tags/brian+beckman" target="_blank"&gt;Brian Beckman&lt;/a&gt; demonstrates three ways of labeling a binary tree with unique integer node numbers: (1) by hand, (2) non-monadically, but functionally, by threading an updating counter state variable through function arguments, and (3) monadically, by using a partially generalized state-monad implementation to handle the threading via composition. Of course during this lesson from one of the masters of mathematical programming, we wind through various conversational contexts, but always stay true to the default topic in a stateful monadic way (watch/listen to this piece to understand what this actually means :))&lt;br /&gt;
&lt;br /&gt;
This is another great conversation with astrophysicist and programming master Brian Beckman. Brian is one of the true human treasures of Microsoft. If you don't get mondas, this is a great primer. Even if you don't care about monadic data types, this is worth your time, especially if you write code for a living. This is part 2 of a 2 part series. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Expressing-State-The-State-Monad/" target="_blank"&gt;&lt;strong&gt;See part 1 here&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
Below, you will find several exercises for generalizing the constructions further. &lt;a href="http://mschnlnine.vo.llnwd.net/d1/ch9/StateMonad.zip" target="_blank"&gt;&lt;strong&gt;Here are the source files you need for playing with these algorithms in visual studio or your favorite Haskell environment&lt;/strong&gt;&lt;/a&gt;. Brian will monitor this thread so start your coding engines!!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Exercise 1&lt;/b&gt;: generalize over the type of the state, from int&lt;br /&gt;
to &amp;lt;S&amp;gt;, say, so that the SM type can handle any kind of&lt;br /&gt;
state object. Start with Scp&amp;lt;T&amp;gt; --&amp;gt; Scp&amp;lt;S, T&amp;gt;, from&lt;br /&gt;
"label-content pair" to "state-content pair".
&lt;p&gt;&lt;b&gt;Exercise 2&lt;/b&gt;: go from labeling a tree to doing a constrained&lt;br /&gt;
container computation, as in WPF. Give everything a&lt;br /&gt;
bounding box, and size subtrees to fit inside their&lt;br /&gt;
parents, recursively.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 3&lt;/b&gt;: promote @return and @bind into an abstract&lt;br /&gt;
class "M" and make "SM" a subclass of that.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 4 (HARD)&lt;/b&gt;: go from binary tree to n-ary tree.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 5&lt;/b&gt;: Abstract from n-ary tree to IEnumerable; do&lt;br /&gt;
everything in LINQ! (Hint: SelectMany).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 6&lt;/b&gt;: Go look up monadic parser combinators and&lt;br /&gt;
implement an elegant parser library on top of your new&lt;br /&gt;
state monad in LINQ.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 7&lt;/b&gt;: Verify the Monad laws, either abstractly&lt;br /&gt;
(pencil and paper), or mechnically, via a program, for the&lt;br /&gt;
state monad.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 8&lt;/b&gt;: Design an interface for the operators @return&lt;br /&gt;
and @bind and rewrite the state monad so that it implements&lt;br /&gt;
this interface. See if you can enforce the monad laws&lt;br /&gt;
(associativity of @bind, left identity of @return, right&lt;br /&gt;
identity of @return) in the interface implementation.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 9&lt;/b&gt;: Look up the List Monad and implement it so that it implements the same interface.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exercise 10&lt;/b&gt;: deconstruct this entire example by using&lt;br /&gt;
destructive updates (assignment) in a discipline way that&lt;br /&gt;
treats the entire CLR and heap memory as an "ambient&lt;br /&gt;
monad." Identify the @return and @bind operators in this&lt;br /&gt;
monad, implement them explicitly both as virtual methods&lt;br /&gt;
and as interface methods.&lt;/p&gt;&lt;img src="http://channel9.msdn.com/444320/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Stateless-State-The-State-Monad-Part-2/</comments><link>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Stateless-State-The-State-Monad-Part-2/</link><pubDate>Thu, 20 Nov 2008 21:38:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_2MB_ch9.wmv</guid><evnet:views>93791</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/444320/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Concurrency is a problem that faces all developers as we move to the age of ManyCore processor architectures. Managing state is an important aspect of programming generally and for parallel programming especially. The great Brian Beckman demonstrates three ways of labeling a binary tree with unique integer node numbers: (1) by hand, (2) non-monadically, but functionally, by threading an updating counter state variable through function arguments, and (3) monadically, by using a partially generalized state-monad implementation to handle the threading via composition. Of course during this lesson from one of the masters of mathematical programming, we wind through various conversational contexts, but always stay true to the default topic in a stateful monadic way (watch/listen to this piece to understand what this actually means &lt;img src='/emoticons/C9/emotion-1.gif' alt='Smiley' /&gt;)This is another great conversation with astrophysicist and programming master Brian Beckman. Brian is one of the true human treasures of Microsoft. If you don't get mondas, this is a great primer. Even if you don't care about monadic data types, this is worth your time, especially if you write code for a living. This is part 2 of a 2 part series.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_large_ch9.jpg" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_small_ch9.jpg" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_ch9.mp4" expression="full" duration="1483" fileSize="84221495" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_ch9.mp3" expression="full" duration="1483" fileSize="11869332" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_ch9.mp4" expression="full" duration="1483" fileSize="84221495" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_ch9.wma" expression="full" duration="1483" fileSize="12006387" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_ch9.wmv" expression="full" duration="1483" fileSize="94246695" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_2MB_ch9.wmv" expression="full" duration="1483" fileSize="464390843" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_Zune_ch9.wmv" expression="full" duration="1483" fileSize="117646755" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart2_2MB_ch9.wmv" length="464390843" type="video/x-ms-wmv" /><dc:creator>Charles</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Stateless-State-The-State-Monad-Part-2/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/444320/Trackback.aspx</trackback:ping><category>Brian Beckman</category><category>Concurrency</category><category>Functional Programming</category><category>Monads</category><category>Parallel Computing</category><category>Programming</category></item><item><title>Brian Beckman: The Zen of Stateless State - The State Monad - Part 1</title><description>&lt;img src="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_small_ch9.jpg" border="0" /&gt;Concurrency is a problem that faces all developers as we move to the age of ManyCore processor architectures. Managing state is an important aspect of programming generally and for parallel programming especially. The great &lt;a href="http://channel9.msdn.com/tags/brian+beckman" target="_blank"&gt;Brian Beckman&lt;/a&gt; demonstrates three ways of labeling a binary tree with unique integer node numbers: (1) by hand, (2) non-monadically, but functionally, by threading an updating counter state variable through function arguments, and (3) monadically, by using a partially generalized state-monad implementation to handle the threading via composition. Of course during this lesson from one of the masters of mathematical programming, we wind through various conversational contexts, but always stay true to the default topic in a stateful monadic way (watch/listen to this piece to understand what this actually means :))&lt;br /&gt;
&lt;br /&gt;
This is another great conversation with astrophysicist and programming master Brian Beckman. Brian is one of the true human treasures of Microsoft. If you don't get mondas, this is a great primer. Even if you don't care about monadic data types, this is worth your time, especially if you write code for a living. This is part 1 of a 2 part series.&lt;br /&gt;
 &lt;br /&gt;
&lt;a href="http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Stateless-State-The-State-Monad-Part-2/" target="_blank"&gt;&lt;strong&gt;See Part 2 here&lt;/strong&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Included with this interview is &lt;a href="http://mschnlnine.vo.llnwd.net/d1/ch9/StateMonad.zip"&gt;a .zip file containing all of the code and diagrams Brian shows us &lt;/a&gt;(including both Haskell and C#). To understand the State Monad program, it may be best to start with Main, seeing how the various facilities are used, then backtrack through the code learning first the non-monadic tree labeler, starting with the function Label, then finally the monadic tree labeler, starting with the function MLabel.  &lt;br /&gt;
&lt;br /&gt;
Below, you will find several exercises for generalizing the constructions further. Brian will monitor this thread so start your coding engines!!&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 1&lt;/strong&gt;: generalize over the type of the state, from int$0 to &amp;lt;S&amp;gt;, say, so that the SM type can handle any kind of$0 state object. Start with Scp&amp;lt;T&amp;gt; --&amp;gt; Scp&amp;lt;S, T&amp;gt;, from "label-content pair" to "state-content pair".&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 2&lt;/strong&gt;: go from labeling a tree to doing a constrained$0 container computation, as in WPF. Give everything a$0 bounding box, and size subtrees to fit inside their$0 parents, recursively.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 3&lt;/strong&gt;: promote @return and @bind into an abstract$0 class "M" and make "SM" a subclass of that.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 4 (HARD)&lt;/strong&gt;: go from binary tree to n-ary tree.&lt;br /&gt;
&lt;br /&gt;
E&lt;strong&gt;xercise 5&lt;/strong&gt;: Abstract from n-ary tree to IEnumerable; do everything in LINQ! (Hint: SelectMany).&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 6&lt;/strong&gt;: Go look up monadic parser combinators and implement an elegant parser library on top of your new$0 state monad in LINQ.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 7&lt;/strong&gt;: Verify the Monad laws, either abstractly$0 (pencil and paper), or mechnically, via a program, for the state monad.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 8&lt;/strong&gt;: Design an interface for the operators @return and @bind and rewrite the state monad so that it implements this interface. See if you can enforce the monad laws (associativity of @bind, left identity of @return, right identity of @return) in the interface implementation.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 9&lt;/strong&gt;: Look up the List Monad and implement it so that it implements the same interface.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exercise 10&lt;/strong&gt;: deconstruct this entire example by using destructive updates (assignment) in a discipline way that treats the entire CLR and heap memory as an "ambient monad." Identify the @return and @bind operators in this monad, implement them explicitly both as virtual methods and as interface methods.&lt;img src="http://channel9.msdn.com/443798/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Expressing-State-The-State-Monad/</comments><link>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Expressing-State-The-State-Monad/</link><pubDate>Thu, 20 Nov 2008 21:36:00 GMT</pubDate><guid isPermaLink="false">http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_2MB_ch9.wmv</guid><evnet:views>96311</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/443798/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The great Brian Beckman demonstrates three ways of labeling a binary tree with unique integer node numbers: (1) by hand, (2) non-monadically, but functionally, by threading an updating counter state variable through function arguments, and (3) monadically, by using a partially generalized state-monad implementation to handle the threading via composition. Another great conversation with astrophysicist and programming master Brian Beckman. Brian is one of the true human treasures of Microsoft. If you don't get mondas, this is a great primer. Even if you don't care about monadic data types, this is worth your time, especially if you write code for a living.</evnet:previewtext><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_large_ch9.jpg" height="240" width="320" /><media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_small_ch9.jpg" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_ch9.mp4" expression="full" duration="2534" fileSize="143848224" type="video/mp4" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_ch9.mp3" expression="full" duration="2534" fileSize="20278462" type="audio/mp3" medium="audio" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_ch9.mp4" expression="full" duration="2534" fileSize="143848224" type="video/mp4" medium="video" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_ch9.wma" expression="full" duration="2534" fileSize="20504703" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_ch9.wmv" expression="full" duration="2534" fileSize="160874361" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_2MB_ch9.wmv" expression="full" duration="2534" fileSize="793373149" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_Zune_ch9.wmv" expression="full" duration="2534" fileSize="200917061" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/2/3/4/4/4/BeckmanStateMonadPart1_2MB_ch9.wmv" length="793373149" type="video/x-ms-wmv" /><dc:creator>Charles</dc:creator><slash:comments>47</slash:comments><wfw:commentRss>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-The-Zen-of-Expressing-State-The-State-Monad/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/443798/Trackback.aspx</trackback:ping><category>Brian Beckman</category><category>Concurrency</category><category>Functional Programming</category><category>Monads</category><category>Parallel Computing</category><category>Programming</category></item><item><title>Brian Beckman: Don't fear the Monad</title><description>Functional programming is increasing in popularity these days given the inherent problems with shared mutable state that is rife in the imperative world. As we march on to a world of multi and many-core chipsets, software engineering must evolve to better equip software engineers with the tools to exploit the vast power of multiple core processors as it won't come for free as it did in the recent past which was predictably based on Moore's law.&lt;br /&gt;
&lt;br /&gt;
Of course, learning new ways to think about programming semantics and code patterns are not always straight forward. For example, most imperative programmers (which include most of us who build software for a living...) are somewhat perplexed by the notion of functions as first class data structures that can be combined to create powerful and composable systems. Languages like Haskell are pure functional languages and require programmers to think in a different way, often in a precise mathematical fashion where composing and chaining functions is "the Way". &lt;br /&gt;
&lt;br /&gt;
Dr. &lt;a href="http://channel9.msdn.com/tags/Brian+Beckmanshape="&gt;Brian Beckman&lt;/a&gt;, a Channel 9 celebrity, astrophysicist and senior software engineer thought it would be a very good idea to address the complexity of &lt;a href="http://en.wikipedia.org/wiki/Monads_in_functional_programming"&gt;monads&lt;/a&gt; in an easy to understand way: a technical conversation at the whiteboard with yours truly for Channel 9. &lt;br /&gt;
&lt;br /&gt;
This video interview is the result of Brian's idea that he can in fact remove the fear of monads from anybody who pays attention to his explanation. Of course, you can't just cover monads in a vacuum (category theory is not really addressed here) so the context is &lt;em&gt;functional programming&lt;/em&gt; (Brian covers functions and composable functional structures (function chains) and of course monoids and then monads).&lt;br /&gt;
&lt;br /&gt;
Tune in. There's a lot to learn here and only Brian can make monads easy to understand for the rest of us!&lt;br /&gt;
&lt;br /&gt;
Happy Thanksgiving to all the US Niners out there.&lt;br /&gt;
&lt;br /&gt;
Enjoy.&lt;img src="http://channel9.msdn.com/249560/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads/</comments><link>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads/</link><pubDate>Thu, 22 Nov 2007 18:28:00 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads/</guid><evnet:views>53818</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/249560/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Functional programming is increasing in popularity these days given the inherent problems with shared mutable state that is rife in the imperative world. As we march on to a world of multi and many-core chipsets, software engineering must evolve to better equip software engineers with the tools to exploit the vast power of multiple core processors as it won't come for free as it did in the recent past which was predictably based on Moore's law.Of course, learning new ways to think about programming semantics and code patterns are not always straight forward. For example, most imperative…</evnet:previewtext><media:thumbnail url="http://channel9.msdn.com/Link/6dcfbd46-1e71-4490-b4c2-7e73fc35e02b/" height="240" width="320" /><media:thumbnail url="http://channel9.msdn.com/Link/974f44aa-8a8b-481d-9d16-cb438d3b603f/" height="240" width="320" /><media:thumbnail url="http://channel9.msdn.com/Link/1e2668cf-a66a-410f-8d70-6c51bba5093b/" height="240" width="320" /><media:thumbnail url="http://channel9.msdn.com/Link/3f15b5b3-38fd-46a2-acdc-2f109ad72d05/" height="64" width="85" /><media:thumbnail url="http://channel9.msdn.com/Link/54c44fe1-e452-4c3d-91cf-3561068d93fe/" height="64" width="85" /><media:thumbnail url="http://channel9.msdn.com/Link/81f91bc5-c998-4b83-a52f-85256ddaac16/" height="64" width="85" /><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/Beckman_OnMonoids_NoFear_ch9.mp3" expression="full" duration="4029" fileSize="32239908" type="audio/mp3" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/Beckman_OnMonoids_NoFear_ch9.wma" expression="full" duration="4029" fileSize="32598459" type="audio/x-ms-wma" medium="audio" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/Beckman_On_Monads.wmv" expression="full" duration="4029" fileSize="1261286119" type="video/x-ms-wmv" medium="video" /></media:group><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/0/Beckman_On_Monads.wmv" length="1261286119" type="video/x-ms-wmv" /><dc:creator>Charles</dc:creator><slash:comments>54</slash:comments><wfw:commentRss>http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/249560/Trackback.aspx</trackback:ping><category>Brian Beckman</category><category>Functional Programming</category><category>Monads</category><category>MS Personalities</category><category>Programming</category><category>Software Composability</category></item><item><title>Brian Beckman: Monads, Monoids, and Mort</title><description>Brian Beckman is a fascinating individual. Ex-cosmologist, ex-military operating system and simulation developer (have you ever considered processes that move both forward and backward in time? Well, Brian and team at JPL created just that. He explains in this interview...).&amp;nbsp;Brian was one of the first members of Microsoft Research and one of a group of physicists who joined Microsoft in the early 90s. At Microsoft he is a passionate advocate for Mort, the somewhat ambiguous class name for novice developers. In fact, he considers himself a mort (somewhat hard to believe, honestly, but we'll go along with it...). His team works on innovative incubation projects that turn into developer platform features (like LINQ, for example) and more. Tune in&amp;nbsp;to this very interesting interview.&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;a href="http://weblogs.asp.net/brianbec/"&gt;Brainbec's Weblog&lt;/a&gt;&lt;BR&gt;&lt;img src="http://channel9.msdn.com/225190/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/posts/Charles/Brian-Beckman-Monads-Monoids-and-Mort/</comments><link>http://channel9.msdn.com/posts/Charles/Brian-Beckman-Monads-Monoids-and-Mort/</link><pubDate>Tue, 29 Aug 2006 17:34:24 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Charles/Brian-Beckman-Monads-Monoids-and-Mort/</guid><evnet:views>61442</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/225190/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Brian Beckman is a fascinating individual. Ex-cosmologist, ex-military operating system and simulation developer (have you ever considered processes that move both forward and backward in time? Well, Brian and team at JPL created just that. He explains in this interview...).&amp;nbsp;Brian was one of the first members of Microsoft Research and one of a group of physicists who joined Microsoft in the early 90s. At Microsoft he is a passionate advocate for Mort, the somewhat ambiguous class name for novice developers. In fact, he considers himself a mort (somewhat hard to believe, honestly, but&amp;#8230;</evnet:previewtext><media:thumbnail url="http://channel9.msdn.com/Link/743d93cf-bd86-45ee-b920-f236a55f2d28/" height="240" width="320" /><media:thumbnail url="http://channel9.msdn.com/Link/af8524e6-0cc2-4a44-8705-68fd52ed9a14/" height="240" width="320" /><media:thumbnail url="http://channel9.msdn.com/Link/4f70261f-ce4a-44bc-b879-923683f922c5/" height="64" width="85" /><media:thumbnail url="http://channel9.msdn.com/Link/83958c83-15e3-4c61-87c2-070579ec5f94/" height="64" width="85" /><media:content isDefault="true" url="http://mschnlnine.vo.llnwd.net/d1/ch9/8/3/4/0/3/2/BrianBeckman.wmv" expression="full" type="video/x-ms-wmv" medium="video" /><enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/8/3/4/0/3/2/BrianBeckman.wmv" length="1" type="video/x-ms-wmv" /><dc:creator>Charles</dc:creator><slash:comments>32</slash:comments><wfw:commentRss>http://channel9.msdn.com/posts/Charles/Brian-Beckman-Monads-Monoids-and-Mort/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/225190/Trackback.aspx</trackback:ping><category>ADO.NET</category><category>Brian Beckman</category><category>LINQ</category><category>Monads</category><category>MS Personalities</category><category>MS Research</category><category>Software Composability</category><category>VB.NET</category></item></channel></rss>