<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Andrew Lilley Brinker — Programming</title>
  <subtitle>Posts about Programming</subtitle>
  <id>https://www.alilleybrinker.com/topics/programming/atom.xml</id>
  <link rel="self" type="application/atom+xml" href="https://www.alilleybrinker.com/topics/programming/atom.xml"/>
  <link rel="alternate" type="text/html" href="https://www.alilleybrinker.com/topics/programming/"/>
  <updated>2025-02-19T12:00:00.000Z</updated>
  <author><name>Andrew Lilley Brinker</name><uri>https://www.alilleybrinker.com/</uri></author>
  <entry>
    <title>The Best Monad Tutorial Ever Written</title>
    <id>https://www.alilleybrinker.com/blog/the-best-monad-tutorial/</id>
    <link rel="alternate" type="text/html" href="https://www.alilleybrinker.com/blog/the-best-monad-tutorial/"/>
    <published>2025-02-19T12:00:00.000Z</published>
    <updated>2025-02-19T12:00:00.000Z</updated>
    <summary>Rain Paharia has done it, they’ve explained monads with real, practical examples.</summary>
    <content type="html" xml:base="https://www.alilleybrinker.com/blog/the-best-monad-tutorial/">&lt;p&gt;When &lt;a href=&quot;https://bsky.app/profile/sunshowers.io&quot;&gt;Rain&lt;/a&gt; mentioned recently they had a draft monad tutorial that explains
them &lt;em&gt;without mathematical jargon&lt;/em&gt;, with &lt;em&gt;practical examples&lt;/em&gt;, and as a
&lt;em&gt;design pattern&lt;/em&gt;, I knew it was going to be good. Of course, it is &lt;strong&gt;even
better than I hoped&lt;/strong&gt;.&lt;/p&gt;
&lt;p class=&quot;hang-double&quot;&gt;&lt;a href=&quot;https://sunshowers.io/posts/monads-through-pbt/&quot;&gt;“Demystifying monads in Rust through property-based testing”&lt;/a&gt; is an
undersell of a title. If you’ve floated around the world of functional
programming long, you’ve probably seen one of the many attempts at explaining
monads. Many are from the perspective of a formalism&lt;span class=&quot;em-dash&quot;&gt;—&lt;/span&gt;the monad laws&lt;span class=&quot;em-dash&quot;&gt;—&lt;/span&gt;and
written with Haskell&lt;span class=&quot;em-dash&quot;&gt;—&lt;/span&gt;the language that made them a central feature with
syntactic sugar and a direct to how IO is done.&lt;/p&gt;
&lt;p&gt;Rain instead introduces monads with a practical example of how their
flexibility actually makes some work harder, motivated with a concrete example
of how “shrinking,” a core operation for doing practical property-based
testing, becomes much more difficult when monadic operations are used to
generate test inputs. Instead of Haskell, the tutorial uses Rust.&lt;/p&gt;
&lt;p&gt;Thanks Rain for the best monad tutorial I’ve ever read!&lt;/p&gt;</content>
  </entry>
</feed>
