<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Lazier functional programming, part 1</title>
	<atom:link href="http://conal.net/blog/posts/lazier-functional-programming-part-1/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog/posts/lazier-functional-programming-part-1</link>
	<description>Inspirations &#38; experiments, mainly about denotative/functional programming in Haskell</description>
	<lastBuildDate>Sat, 26 Sep 2020 21:06:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.17</generator>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Adding numbers</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-754</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Adding numbers]]></dc:creator>
		<pubDate>Mon, 25 Oct 2010 22:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-754</guid>
		<description><![CDATA[&lt;p&gt;[...] Lazier functional programming, part 1  [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Lazier functional programming, part 1  [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Lazier functional programming, part 2</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-753</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Lazier functional programming, part 2]]></dc:creator>
		<pubDate>Sun, 19 Sep 2010 19:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-753</guid>
		<description><![CDATA[&lt;p&gt;[...] About      &#171; Lazier functional programming, part 1 [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] About      &laquo; Lazier functional programming, part 1 [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-752</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Sat, 18 Sep 2010 20:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-752</guid>
		<description><![CDATA[&lt;blockquote&gt;
  &lt;p&gt;You don’t say what we have at our disposal to solve the puzzle. If we are restricted to lambda definable functions there isn’t much to do. If we have something like por it’s a different matter.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;augustss: I didn&#039;t want to bias people&#039;s explorations.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<blockquote>
  <p>You don’t say what we have at our disposal to solve the puzzle. If we are restricted to lambda definable functions there isn’t much to do. If we have something like por it’s a different matter.</p>
</blockquote>

<p>augustss: I didn&#8217;t want to bias people&#8217;s explorations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Sankel</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-751</link>
		<dc:creator><![CDATA[David Sankel]]></dc:creator>
		<pubDate>Thu, 16 Sep 2010 14:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-751</guid>
		<description><![CDATA[&lt;p&gt;@dimtar: Awesome!&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@dimtar: Awesome!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dimitar</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-750</link>
		<dc:creator><![CDATA[dimitar]]></dc:creator>
		<pubDate>Wed, 15 Sep 2010 15:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-750</guid>
		<description><![CDATA[&lt;p&gt;I was wrong again: &lt;code&gt;f ⊥ ≡ g ⊥&lt;/code&gt; is too strong. From Albert Lai&#039;s explanation the minimal strictness is achieved when: &lt;code&gt;either f g ⊥ = f⊥ ⊓ g⊥&lt;/code&gt;. In Haskell:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;either :: (HasLub c, HasGlb c) =&gt; (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
either f g x = (f undefined) `glb` (g undefined) `lub` strictEither f g x
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When &lt;code&gt;c&lt;/code&gt; is flat domain it is essentially David Sankel&#039;s solution.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I was wrong again: <code>f ⊥ ≡ g ⊥</code> is too strong. From Albert Lai&#8217;s explanation the minimal strictness is achieved when: <code>either f g ⊥ = f⊥ ⊓ g⊥</code>. In Haskell:</p>

<pre><code>either :: (HasLub c, HasGlb c) =&gt; (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
either f g x = (f undefined) `glb` (g undefined) `lub` strictEither f g x
</code></pre>

<p>When <code>c</code> is flat domain it is essentially David Sankel&#8217;s solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-749</link>
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Wed, 15 Sep 2010 13:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-749</guid>
		<description><![CDATA[&lt;p&gt;The opposite of &#039;strict&#039; is &#039;lax&#039;, so &#039;less strict&#039; would be &#039;laxer&#039;.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>The opposite of &#8216;strict&#8217; is &#8216;lax&#8217;, so &#8216;less strict&#8217; would be &#8216;laxer&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dimitar</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-748</link>
		<dc:creator><![CDATA[dimitar]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 18:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-748</guid>
		<description><![CDATA[&lt;p&gt;Yeah, my guess is broken. I was naive hoping that the restriction f ⊥ ≡ g ⊥ can be relaxed.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Yeah, my guess is broken. I was naive hoping that the restriction f ⊥ ≡ g ⊥ can be relaxed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Sankel</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-747</link>
		<dc:creator><![CDATA[David Sankel]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 13:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-747</guid>
		<description><![CDATA[&lt;p&gt;using &lt;code&gt;lub&lt;/code&gt; instead of &lt;code&gt;unamb&lt;/code&gt; would make my version a bit lazier.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>using <code>lub</code> instead of <code>unamb</code> would make my version a bit lazier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Sankel</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-746</link>
		<dc:creator><![CDATA[David Sankel]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 03:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-746</guid>
		<description><![CDATA[&lt;p&gt;Making my version more efficient.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;either :: (Eq c, Lub c) ⇒ (a → c) → (b → c) → Either a b → c
either f g e = t1 `unamb` t2
  where t1 = let a = f undefined
                 b = g undefined
             in if a == b then (a `lub` b) else undefined
        t2 = case e of Left a → f a
                       Right b → g b
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Making my version more efficient.</p>

<pre><code>either :: (Eq c, Lub c) ⇒ (a → c) → (b → c) → Either a b → c
either f g e = t1 `unamb` t2
  where t1 = let a = f undefined
                 b = g undefined
             in if a == b then (a `lub` b) else undefined
        t2 = case e of Left a → f a
                       Right b → g b
</code></pre>

<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Sankel</title>
		<link>http://conal.net/blog/posts/lazier-functional-programming-part-1#comment-745</link>
		<dc:creator><![CDATA[David Sankel]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 02:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=190#comment-745</guid>
		<description><![CDATA[&lt;p&gt;lazierEither does not meet the consistancy requirements for lub. consider:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;lazierEither (const True) (const False)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;⇓&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(const True . fromLeft) `lub` (const False . fromRight)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>lazierEither does not meet the consistancy requirements for lub. consider:</p>

<pre><code>lazierEither (const True) (const False)
</code></pre>

<p></p>

<p>⇓</p>

<pre><code>(const True . fromLeft) `lub` (const False . fromRight)
</code></pre>

<p></p>
]]></content:encoded>
	</item>
</channel>
</rss>
