<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
	>
<channel>
	<title>Comments on: Ocaml Lazy Lists- An Introduction</title>
	<atom:link href="http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/</link>
	<description>programming, politics, &#38; other religious issues</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:16:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Java&#8217;s Failure to be Lazy</title>
		<link>http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/#comment-37194</link>
		<dc:creator>Java&#8217;s Failure to be Lazy</dc:creator>
		<pubDate>Sun, 31 Jan 2010 16:18:42 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/01/01/177#comment-37194</guid>
		<description>[...] that BHurt has done a nice job talking about why Laziness is cool, I&#8217;ve got a bit of an ax to [...]</description>
		<content:encoded><![CDATA[<p>[...] that BHurt has done a nice job talking about why Laziness is cool, I&#8217;ve got a bit of an ax to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curt Sampson</title>
		<link>http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/#comment-36054</link>
		<dc:creator>Curt Sampson</dc:creator>
		<pubDate>Sun, 14 Jun 2009 04:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/01/01/177#comment-36054</guid>
		<description>Actually, we use exactly this sort of thing in a few places in production code for iterative algorithms an automated options trading system written in Haskell.</description>
		<content:encoded><![CDATA[<p>Actually, we use exactly this sort of thing in a few places in production code for iterative algorithms an automated options trading system written in Haskell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sean</title>
		<link>http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/#comment-33866</link>
		<dc:creator>sean</dc:creator>
		<pubDate>Tue, 18 Nov 2008 18:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/01/01/177#comment-33866</guid>
		<description>JT, if you haven&#039;t figured it out by now it&#039;s quite simple.  zlist_of_list could be implemented something like this

  let rec zlist_of_list lis = lazy( 
    match lis with 
      [] -&gt; Empty 
    &#124; h::res -&gt; Node(h, zlist_of_list res) 
  );;

...that is, we return a lazy thunk which is going to match either the empty list or split off the head and return a node with that first element in the head and call itself recursively on the tail to make the zlist be lazily created one link at a time.

list_of_zlist looks like this:

  let rec list_of_zlist zl =
    let hd = Lazy.force zl in
    match hd with 
      Empty -&gt; [] 
    &#124; Node(h, t) -&gt; h::(list_of_zlist t);;

We force the head of the list, then see if there&#039;s more we need to force and do so if we have to by recursive call.</description>
		<content:encoded><![CDATA[<p>JT, if you haven&#8217;t figured it out by now it&#8217;s quite simple.  zlist_of_list could be implemented something like this</p>
<p>  let rec zlist_of_list lis = lazy(<br />
    match lis with<br />
      [] -&gt; Empty<br />
    | h::res -&gt; Node(h, zlist_of_list res)<br />
  );;</p>
<p>&#8230;that is, we return a lazy thunk which is going to match either the empty list or split off the head and return a node with that first element in the head and call itself recursively on the tail to make the zlist be lazily created one link at a time.</p>
<p>list_of_zlist looks like this:</p>
<p>  let rec list_of_zlist zl =<br />
    let hd = Lazy.force zl in<br />
    match hd with<br />
      Empty -&gt; []<br />
    | Node(h, t) -&gt; h::(list_of_zlist t);;</p>
<p>We force the head of the list, then see if there&#8217;s more we need to force and do so if we have to by recursive call.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Cheap Sitcom Clip Scene Blog Post &#124; Enfranchised Mind</title>
		<link>http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/#comment-33571</link>
		<dc:creator>The Cheap Sitcom Clip Scene Blog Post &#124; Enfranchised Mind</dc:creator>
		<pubDate>Tue, 15 Jul 2008 05:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/01/01/177#comment-33571</guid>
		<description>[...] &#8220;&#8230;there is a difference between what a programming language makes possible, and what it makes easy. Making lazy evaluation easy- and in other languages, such as Haskell, even mandatory- changes things. An example of what I mean by this is lazy lists.&#8221; (Ocaml Lazy Lists- An Introduction) [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8220;&#8230;there is a difference between what a programming language makes possible, and what it makes easy. Making lazy evaluation easy- and in other languages, such as Haskell, even mandatory- changes things. An example of what I mean by this is lazy lists.&#8221; (Ocaml Lazy Lists- An Introduction) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Teller</title>
		<link>http://enfranchisedmind.com/blog/posts/ocaml-lazy-lists-an-introduction/#comment-33190</link>
		<dc:creator>David Teller</dc:creator>
		<pubDate>Sun, 11 May 2008 14:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/01/01/177#comment-33190</guid>
		<description>If you are interested, here&#039;s a preview implementation of a full-featured module LazyList. It has been submitted to ExtLib : https://forge.ocamlcore.org/frs/shownotes.php?release_id=12 .</description>
		<content:encoded><![CDATA[<p>If you are interested, here&#8217;s a preview implementation of a full-featured module LazyList. It has been submitted to ExtLib : <a href="https://forge.ocamlcore.org/frs/shownotes.php?release_id=12" rel="nofollow">https://forge.ocamlcore.org/frs/shownotes.php?release_id=12</a> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>

