<story><title>Red and blue functions are a good thing</title><url>https://blainehansen.me/post/red-blue-functions-are-actually-good/</url></story><parent_chain><item><author>willtim</author><text>And why restrict oneself to just two colours? Haskell monads also allow one to abstract over the &amp;quot;colour&amp;quot;, such that one can write polymorphic code that works for any colour, which I think was the main objection from the original red&amp;#x2F;blue post.&lt;p&gt;Microsoft&amp;#x27;s Koka is an example of a language that further empraces effect types and makes them easier to use:
&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;koka-lang.github.io&amp;#x2F;koka&amp;#x2F;doc&amp;#x2F;index.html&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;koka-lang.github.io&amp;#x2F;koka&amp;#x2F;doc&amp;#x2F;index.html&lt;/a&gt;</text></item></parent_chain><comment><author>simiones</author><text>Don&amp;#x27;t monads in themselves have the same problem of introducing &amp;quot;coloring&amp;quot; (where each monad is a different color) , so that functions which work for one monad won&amp;#x27;t work with easily compose with functions which work with another monad?&lt;p&gt;For example, isn&amp;#x27;t it true that you can&amp;#x27;t easily compose a function f :: a -&amp;gt; IO b with a function g :: b -&amp;gt; [c] (assuming you don&amp;#x27;t use unsafePerformIO, of course)?&lt;p&gt;Of course, there will be ways to do it (just as you can wrap a sync function in an async function, or .Wait() on an async function result to get a sync function), and Haskell&amp;#x27;s very high level of abstraction will make that wrapping easier than in a language like C#.</text></comment>
<story><title>Red and blue functions are a good thing</title><url>https://blainehansen.me/post/red-blue-functions-are-actually-good/</url></story><parent_chain><item><author>willtim</author><text>And why restrict oneself to just two colours? Haskell monads also allow one to abstract over the &amp;quot;colour&amp;quot;, such that one can write polymorphic code that works for any colour, which I think was the main objection from the original red&amp;#x2F;blue post.&lt;p&gt;Microsoft&amp;#x27;s Koka is an example of a language that further empraces effect types and makes them easier to use:
&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;koka-lang.github.io&amp;#x2F;koka&amp;#x2F;doc&amp;#x2F;index.html&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;koka-lang.github.io&amp;#x2F;koka&amp;#x2F;doc&amp;#x2F;index.html&lt;/a&gt;</text></item></parent_chain><comment><author>benrbray</author><text>Fun Fact:  The author of Koka (Daan Leijen) wrote a LaTeX-flavored Markdown editor called Madoko [1] using Koka!  It is used to render the &amp;quot;Programming Z3&amp;quot; book [2], for instance.&lt;p&gt;[1] &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;madoko.org&amp;#x2F;reference.html&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;madoko.org&amp;#x2F;reference.html&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;theory.stanford.edu&amp;#x2F;~nikolaj&amp;#x2F;programmingz3.html&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;theory.stanford.edu&amp;#x2F;~nikolaj&amp;#x2F;programmingz3.html&lt;/a&gt;</text></comment>