<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13/RSS"></atom:link>
	<image>
		<url>http://ecn.channel9.msdn.com/o9/previewImages/100/498918_100x75.jpg</url>
		<title>Channel 9 - C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<link></link>
	</image>
	<description>In Chapter 5, Dr. Meijer introduces and digs into List Comprehensions. In mathematics, comprehension notation is used to construct new sets from old sets. In Haskell, you can create new lists from old lists using a similarcomprehension syntax:[x^2 | x &amp;lt;- [1..5]]The above notation represents the list [1,4,9,16,25] of all numbers x^2 such that x is an element of the list [1..5]. The &amp;lt;- [1..5] syntax is known as agenerator and list comprehensions can have mulitple generators that can have explicit dependencies on other generators. You will also learn aboutguards, which restrict values created by earlier generators.You should watch these in sequence (or skip around depending on your curent level of knowledge in this domain):Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 </description>
	<link></link>
	<language>en</language>
	<pubDate>Sat, 25 May 2013 11:43:40 GMT</pubDate>
	<lastBuildDate>Sat, 25 May 2013 11:43:40 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>At last Thursday is here. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>&nbsp;</p>
<p>Excelent presentation as always. The only thing is that you missed an excelent opportunity to implement &quot;where&quot; using a list comprehension.</p>
<p>&nbsp;</p>
<p><pre class="brush: text">where' :: [a] -&gt; (Int -&gt; a -&gt; Bool) -&gt; [a] where' xs p = [x | (x,i) &lt;- xs', p i x ] where xs' = zip xs [0..]</pre></p>
<p>&nbsp;</p>
<p>Thanks again.</p>
<p>I'm looking forward to the next lecture.</p>
<p>posted by paks8150</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924345700000000</link>
		<pubDate>Thu, 29 Oct 2009 17:36:10 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924345700000000</guid>
		<dc:creator>paks8150</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>I love IEnumerable&lt;char&gt; and recently used it for code-generation from XML to a simple Pascal-like language that generates the same XML - although I had some issue with it at first - as if Intellisense didn't recognize this fact that String : IEnumerable&lt;char&gt;.</p>
<p>&nbsp;</p>
<p>I'm watching the ICFP videos every evening although quite a few of them are so deeply theoretical that you cannot understand them without quite some CS grounding. Nevertheless, there are also quite a few that are more accessible and show you where the future
 is, where the Haskell compiler development is, unusual uses of monads etc. So every interesting indeed.</p>
<p>&nbsp;</p>
<p>Especially the oscar-winning mathematician from Industrial Light &amp; Magic using monads for untangling knots, describing quantum computation, etc. - that was extremely interesting!</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924445480000000</link>
		<pubDate>Thu, 29 Oct 2009 20:22:28 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924445480000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Here's the link for the&nbsp;<a href="http://www.vimeo.com/album/126865/">ICFP 2009 videos</a>.</p>
<p>&nbsp;</p>
<p>Thanks for the great lecture series Erik. Converting the Haskell examples into their .NET equivalents really helps drive home some of the concepts for me. I also found your comparison between functional programming and the GOF design patterns quite enlightening.</p>
<p>&nbsp;</p>
<p>I am waiting to see if Brian Beckman will &quot;pop&quot; in for the Monads lecture?</p>
<p>posted by RobertZ</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924450370000000</link>
		<pubDate>Thu, 29 Oct 2009 20:30:37 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924450370000000</guid>
		<dc:creator>RobertZ</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p><img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /> You never know when the&nbsp;Wizard of Monad will appear....</p>
<p>C</p>
<p>posted by Charles</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924457720000000</link>
		<pubDate>Thu, 29 Oct 2009 20:42:52 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924457720000000</guid>
		<dc:creator>Charles</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Say monad thrice and the Beckman genie is bound by genie law to escape from his Klein bottle and do some monad tricks!</p>
<p>&nbsp;</p>
<p>This is of course a lecture series but how wonderful it would be if there would be a few interruptions along the way but of course the Beckman genie is also busy</p>
<p>&nbsp;</p>
<p>I loved his input on the IO E2E video where he showed in simplest terms what duality really means. The greatest minds find the simplest solutions. - And make them efficient.</p>
<p>&nbsp;</p>
<p><img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924463190000000</link>
		<pubDate>Thu, 29 Oct 2009 20:51:59 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924463190000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>This is the first of the tutorials to really get into the &quot;meat&quot; of Haskell and I enjoyed it quite a bit (especially the fact that I was able to write the solutions with only a few minor missteps in syntax). I may become a Haskell convert: writing type signatures
 does make the code that follows much easier to construct.</p>
<p>posted by Godeke</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924540430000000</link>
		<pubDate>Thu, 29 Oct 2009 23:00:43 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924540430000000</guid>
		<dc:creator>Godeke</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>I take it you meant Enumerable.Range, not Observable.Range?&nbsp; </p>
<p>posted by Richard.Hein</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924562560000000</link>
		<pubDate>Thu, 29 Oct 2009 23:37:36 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924562560000000</guid>
		<dc:creator>Richard.Hein</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>I bet that was on purpose, to show off the new Observable extensions to .Net. Even if that was probably not especially suitable in this case, there's no reason why it wouldn't apply equally well to an IO as an IE, or so it appears. -&nbsp;Speaking of observations!
 (Prettified observations)<a rel="lightbox" href="http://img692.imageshack.us/img692/9869/morfs.png"><img src="http://img692.imageshack.us/img692/9869/morfs.png" alt=""></a>I am starting to see why looking at types is so satisfying! A pure structural/type-level
 examination of semantics is very fascinating. Looking at currying, lists and tuples in this light will be enlightening.</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924566860000000</link>
		<pubDate>Thu, 29 Oct 2009 23:44:46 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924566860000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>From&nbsp;<a href="http://www.haskell.org/onlinereport/list.html">http://www.haskell.org/onlinereport/list.html</a></p>
<p>&nbsp;</p>
<h3>17.4<tt>&nbsp;&nbsp;unfoldr</tt></h3>
<p>The&nbsp;<tt>unfoldr</tt>&nbsp;function is a &quot;dual&quot; to&nbsp;<tt>foldr</tt>: while&nbsp;<tt>foldr</tt>&nbsp;reduces a list to a summary value,&nbsp;<tt>unfoldr</tt>&nbsp;builds a list from a seed value. For example:&nbsp;<tt><br /><br />&nbsp;&nbsp;iterate&nbsp;f&nbsp;==&nbsp;unfoldr&nbsp;(\x&nbsp;-&gt;&nbsp;Just&nbsp;(x,&nbsp;f&nbsp;x))<br /><br /></tt>In some cases,&nbsp;<tt>unfoldr</tt>&nbsp;can undo a&nbsp;<tt>foldr</tt>&nbsp;operation:&nbsp;<tt><br /><br />&nbsp;&nbsp;unfoldr&nbsp;f'&nbsp;(foldr&nbsp;f&nbsp;z&nbsp;xs)&nbsp;==&nbsp;xs<br /><br /></tt>if the following holds:&nbsp;<tt><br /><br />&nbsp;&nbsp;f'&nbsp;(f&nbsp;x&nbsp;y)&nbsp;=&nbsp;Just&nbsp;(x,y)<br />&nbsp;&nbsp;f'&nbsp;z&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;Nothing</tt></p>
<p>posted by Head.In.TheBox</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924711520000000</link>
		<pubDate>Fri, 30 Oct 2009 03:45:52 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924711520000000</guid>
		<dc:creator>Head.In.TheBox</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Or other special guests <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /></p>
<p>posted by Head.In.TheBox</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924712200000000</link>
		<pubDate>Fri, 30 Oct 2009 03:47:00 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924712200000000</guid>
		<dc:creator>Head.In.TheBox</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Talking about unfolds, someone from #haskell once wrote a beautiful implementation using a GHC extension
<a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=5906"><em>here on hpaste</em></a>.</p>
<p>posted by ShinNoNoir</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924976180000000</link>
		<pubDate>Fri, 30 Oct 2009 11:06:58 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924976180000000</guid>
		<dc:creator>ShinNoNoir</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p><pre class="brush: text">concat :: [[a]] -&gt; [a] -- generalized: join :: Monad m =&gt; m (m a) -&gt; m a {- if you sub m=[], you'll get: join :: [] ([] a) -&gt; [] a = join :: [[a]] -&gt; [a] :) -} -- dual of join: duplicate :: Comonad w =&gt; w a -&gt; w (w a) -- but I'm not well
 versed in the area of comonads :p</pre></p>
<p>posted by ShinNoNoir</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924980340000000</link>
		<pubDate>Fri, 30 Oct 2009 11:13:54 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633924980340000000</guid>
		<dc:creator>ShinNoNoir</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>This is not meant to knock anyone.</p>
<p>&nbsp;</p>
<p>I'm sorry, but this constant referring back to C# and Linq might be a &quot;sound strategy&quot; from a Microsoft Product perspective, but it is doing nothing for me in terms of understanding either FP or Haskell, the purported objective of these lecture.</p>
<p>&nbsp;</p>
<p>I can see that people who already are experts in the area are very excited about this. Perhaps they were the intended audience, though I don't understand the need for preaching to the choir... but whatever. Congratulations to all of you. As the expert on
 being a &quot;n00b&quot; .. I can tell you these lectures are doing absolutely ZERO for me. FWIW.</p>
<p>&nbsp;</p>
<p>I'm going back to the Univ. of Aachen lectures on Haskell programming because they are catered towards a less expert audience and don't concentrate so much on how Haskell compares to other technologies (C# or F# or Ruby or Pascal or whatever) so heavily.&nbsp;</p>
<p>&nbsp;</p>
<p>For anyone else who may be (a noob and still) &nbsp;interested, the lectures are here:&nbsp;<a href="http://video.s-inf.de/#FP.2005-SS-Giesl.%28COt%29.HD_Videoaufzeichnung">http://video.s-inf.de/#FP.2005-SS-Giesl.%28COt%29.HD_Videoaufzeichnung</a>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I hope I'll gain enough knowledge to apply Haskell to some of the stuff I need to do in real life, and maybe then I'll be able to understand this lecture series which, truth be told, should be titled &quot;A Comparative study of Haskell and C# for .Net &amp; Haskell
 Experts&quot;.&nbsp;</p>
<p><a href="http://video.s-inf.de/#FP.2005-SS-Giesl.%28COt%29.HD_Videoaufzeichnung"></a></p>
<p><a href="http://video.s-inf.de/#FP.2005-SS-Giesl.%28COt%29.HD_Videoaufzeichnung"></a></p>
<p>posted by reddit</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925157960000000</link>
		<pubDate>Fri, 30 Oct 2009 16:09:56 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925157960000000</guid>
		<dc:creator>reddit</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>You seem to be a troll so it's hard to answer in a cooperative spirit. Moving on ...</p>
<p>&nbsp;</p>
<p>I'd say these lectures are geared towards people who know&nbsp; C#, VB.Net, Java,etc. Mapping back to C# helps ground the concepts. Haskell is like alien technology. It can make things a lot clearer (and more relevant) to correlate it with something you already
 understand. That's kind of true when learning anything new in fact ...</p>
<p>&nbsp;</p>
<p>In any case you can always buy the book at a discount and learn Haskell from the ground up. That's what it was written for.
</p>
<p>posted by Justin Bailey</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925212880000000</link>
		<pubDate>Fri, 30 Oct 2009 17:41:28 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925212880000000</guid>
		<dc:creator>Justin Bailey</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>That is excellent! It is like an &quot;iterated function system&quot;, perfect for things like pseudo-random numbers, cellular automata, L-systems and stuff like that <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>&nbsp;</p>
<p>The (two) books arrived recently. One of them will be a christmas gift. My little brother is going to learn to love FP, whether he likes it or not! <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /></p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925221950000000</link>
		<pubDate>Fri, 30 Oct 2009 17:56:35 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925221950000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>I totally disagree, since I have been able to easily go back to C# and try to write all the Haskell stuff demonstrated in C# in some way.&nbsp; I have learned a lot already from it and it's not only useful for Haskell, since I have already applied some of it
 to my C# programs.</p>
<p>&nbsp;</p>
<p>EDIT:&nbsp; I tried to post the code but the formatting is screwy and I keep getting errors in IE when I try to fix it.&nbsp; Oh well.</p>
<p>posted by Richard.Hein</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925226150000000</link>
		<pubDate>Fri, 30 Oct 2009 18:03:35 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925226150000000</guid>
		<dc:creator>Richard.Hein</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Well, instead of whining, perhaps, you should quietly spend a little more time in the room with the &quot;experts&quot; if you really want to learn anything useful.<a id="ctl00_MainPlaceHolder_Editor_SaveButton_ButtonHyperLink" href=""><span class="button">
</span></a><a id="ctl00_MainPlaceHolder_Editor_SaveButton_ButtonHyperLink" href=""><span class="button"></span></a></p>
<p>posted by Alex O</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925579530000000</link>
		<pubDate>Sat, 31 Oct 2009 03:52:33 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925579530000000</guid>
		<dc:creator>Alex O</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>I went over the top and created a <a href="http://www.facebook.com/group.php?gid=188588005907">
fb group</a> for this lecture series (and allowed myself to call it the Lambda Lecture Series; and will keep &quot;The Wall&quot; clean with just lecture references until the series is done).</p>
<p>&nbsp;</p>
<p>Later on it would be great to hear your take on the Expression Problem, although you've already alluded to it. I was first made aware of it by looking at some example code in Scala. There also appears to be a
<a href="http://www.haskell.org/sitewiki/images/1/1d/Prezentare-Anglo-Haskell-2008-draft2-more-slides.pdf">
Haskell</a> solution to this. Well, let's wait till you have taught us more about monads.</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925944540000000</link>
		<pubDate>Sat, 31 Oct 2009 14:00:54 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633925944540000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Great post, again. Looking forward to the next one in the series!</p>
<p>posted by rgruian</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633928273560000000</link>
		<pubDate>Tue, 03 Nov 2009 06:42:36 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633928273560000000</guid>
		<dc:creator>rgruian</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Is time an effect and should type-systems track it?</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633929697910000000</link>
		<pubDate>Wed, 04 Nov 2009 22:16:31 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633929697910000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Well, ask yourself this: is time always an effect? For example, does the result of sqrt(9) depend on the current time? <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>&nbsp;</p>
<p>But when time does have an effect on the result, the type system should track it. For example, getCurrentTime in Haskell has type IO UTCTime.</p>
<p>&nbsp;</p>
<p>posted by ShinNoNoir</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930202420000000</link>
		<pubDate>Thu, 05 Nov 2009 12:17:22 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930202420000000</guid>
		<dc:creator>ShinNoNoir</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>If it takes infinite time, then it's a clear effect. If it takes t time, then you could say that the result is t time in the future, rather than t-n time in the future - in a manner of speaking it's living in a different world.</p>
<p>&nbsp;</p>
<p>I'm thinking in terms of the environment, time is like state transitions and every state transition is an effect in the world. Of course there's no direct relation between a pure functions definition and how many state transitions it might take to finish,
 given a multitude of compiler rewritings, hmm...</p>
<p>&nbsp;</p>
<p>There is also the matter of dealing with complexity as a tool to know when to parallelize. If a function could be automatically complexity-analyzed then for every function you would know how expensive it was. This would allow you to also express in the type-system
 a higher-order function accepting another function which must have a complexity lower than a certain bound: the compiler and type-checker would guarantee this to be true. Also you might define functions with time-guarantees, that forcefully stop prematurely
 if they cannot complete within some time; or never &quot;start&quot; in the first time, given the former example.</p>
<p>&nbsp;</p>
<p>For DateTime.Now it is clear that the function is not pure, it takes nothing and returns something different every time - there it is clear that the result is time itself and time never stops changing - it's predictably impure. Erik mentioned modelling time
 as an IObservable where you can sample it a couple of times; I'm not sure that's really truly pure as the IO, when you subscribe to it, will return different results every time - which is intended of course; but that's kind of hard to get around.</p>
<p>&nbsp;</p>
<p>The question is: for infinite time, you have bottom, i.e. non-termination. But how much time is bottom? Is it always sufficient to say infinite time or wouldn't it make sense to define more soft times?</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930531490000000</link>
		<pubDate>Thu, 05 Nov 2009 21:25:49 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930531490000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p><em>&quot;Also you might define functions with time-guarantees, that forcefully stop prematurely if they cannot complete within some time;&quot;</em></p>
<p>&nbsp;</p>
<p>Hmm, that's not an easy<em> </em>task. You'd need to encode values as types or you need type constructors that also accept values instead of only types. For example, you'd love to write code like this then:</p>
<p><pre class="brush: text">-- an Int to Int function that takes at most 5 time units someComputation :: Int -&gt; RealTime 5 Int</pre></p>
<p>But now you might also want to do arithmetic at the type level:</p>
<p><pre class="brush: text">-- an example, the type of a function that adds two real-time int results: add :: RealTime t1 Int -&gt; RealTime t2 Int -&gt; RealTime (t1&#43;t2) Int</pre></p>
<p>I think this is getting quite tricky real fast.</p>
<p>&nbsp;</p>
<p>(There is a nice way however to pass values around at the type level, see this paper:&nbsp;<a href="http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf">Functional Pearl: Implicit Configurations —or, Type Classes Reflect the Values of Types</a>)</p>
<p>&nbsp;</p>
<p><em>&quot;The question is: for infinite time, you have bottom, i.e. non-termination. But how much time is bottom? Is it always sufficient to say infinite time or wouldn't it make sense to define more soft times?&quot;</em></p>
<p>&nbsp;</p>
<p>Bottom is the result of anything that fails to produce an answer. I wouldn't overload bottom for computations that do not finish in time, but use the type system instead to tag your values:</p>
<p><pre class="brush: text">-- pseudo-Haskell (no support for values at the type level) data RealTime &lt;Int&gt; a = Result a -- the result of a successful RealTime computation | Aborted -- the result of a computation that took too long</pre></p>
<p>&nbsp;</p>
<p><em><strong>Edit:</strong></em><strong></strong></p>
<p>Just found this, might also be an interesting read: <a href="http://www.joachim-breitner.de/blog/archives/291-Pausable-IO-actions-for-better-GUI-responsiveness.html">
Pausable IO actions for better GUI responsiveness</a>.</p>
<p>posted by ShinNoNoir</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930568850000000</link>
		<pubDate>Thu, 05 Nov 2009 22:28:05 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930568850000000</guid>
		<dc:creator>ShinNoNoir</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Interesting ShinNoNoir. Actually, I've scribbled up a <a href="http://xosfaere.wordpress.com/2009/11/05/the-effect-spectrum-i/">
few loose thoughts</a> about this but in the next post I'll maybe write one of the combinators I've been thinking about: namely the computation pre-emption' combinator. So this would spawn a thread (or maybe task) and
<em>synchronously</em>&nbsp;wait for that task to complete <em>until</em> some time has passed whereafter it will
<em>timeout</em>. This makes timeout or hard limits a pervasive concept in functional programming, if you will. One may say the implementation will be very ugly - depends on OS and .Net primitives - but the abstract idea is quite cool.</p>
<p>&nbsp;</p>
<p>There are many aspects to time and computation and this is probably something where someone as Beckman could talk for hours.</p>
<p>&nbsp;</p>
<p>I'll look into the pausable IO actions - looks good - but threads provide a brutal alternative: they are not sensitive to the granularity of a task, hopefully the OS will ensure that a thread will be interrupted after some time t.</p>
<p>&nbsp;</p>
<p>As for⊥: well the idea is not to misuse bottom but merely to point out that there is a continuum (likely not infinite) between
<em>This Instant</em>&nbsp;(!) and <em>Not Ever</em> (⊥). There is space here to be explored, I find that quite fascinating. People talk about the elephant in the room in relation to parallelism; well time is everywhere and it's not mentioned in any type - talk
 about a taboo topic!'</p>
<p>&nbsp;</p>
<p>' <em>This is probably the wrong name, as I now understand pre-emption to actually mean mature or natural completion of a task ahead of schedule, not forced pre-emption but I don't know the precise term to use for this concept</em></p>
<p>&nbsp;</p>
<p><em>'' <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></em></p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930590550000000</link>
		<pubDate>Thu, 05 Nov 2009 23:04:15 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930590550000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>The <a href="http://www.haskell.org/haskellwiki/Bottom">Haskell page for ⊥</a>reveals something interesting!</p>
<blockquote><em>Bottom is a member of any type, even the trivial type () or the equivalent simple type:<br /><span><em><br />data Unary = Unary<br /><span><em><br />If it were not, the compiler could solve the halting problem and statically determine whether any computation terminated (though note that some languages with dependent type systems, such as Epigram, can statically enforce termination, based on the type for
 particular programs, such as those using induction).</em></span></em></span></em></blockquote>
<p>The important part!</p>
<blockquote><em>...note that some languages with dependent type systems, such as <strong>
Epigram</strong>, can statically enforce termination, based on the type for particular programs, such as those using induction...</em></blockquote>
<p>Let's look at <a href="http://en.wikipedia.org/wiki/Epigram_(programming_language)">
Epigram</a></p>
<blockquote><em>Epigram is the name of a functional programming language with dependent types and of the IDE usually packaged with it. Epigram's type system is strong enough to express program specifications. The goal is to support a smooth transition from
 ordinary programming to integrated programs and proofs whose correctness can be checked and certified by the compiler. Epigram exploits the propositions as types principle, and is based on intuitionistic type theory.</em><em><strong> - Wikipedia</strong></em></blockquote>
<p>Time to look into that too...</p>
<p>&nbsp;</p>
<p>So, Epigram is dependently typed and has a 2-dimensional syntax! - Another reason why code editors need to
<em>evolve.</em></p>
<p>&nbsp;</p>
<p>It appears that the most popular up-in-the-sky proof assistants that are often &nbsp;mentioned on LtU don't exploit the same kind of dependent typing as seen in Epigram (1 or 2). Looks like it's quite novel... cue Eric on type-systems of the future!</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930602500000000</link>
		<pubDate>Thu, 05 Nov 2009 23:24:10 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633930602500000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Here is my take on the homework:</p>
<p>&nbsp;</p>
<p>1. Without looking at the definitions from the standard prelude, define the&nbsp; following library functions using recursion.</p>
<p>&nbsp;</p>
<p>- Decide if all logical values in a list are True:</p>
<p><pre class="brush: text">and' :: [Bool] -&gt; Bool and' [] = True and' (False:_) = False and' (_:xs) = and xs</pre></p>
<p>&nbsp;</p>
<p>- Concatenate a list of lists:</p>
<p><pre class="brush: text">concat' :: [[a]] -&gt; [a] concat' [] = [] concat' (xs:xss) = xs &#43;&#43; concat' xss</pre></p>
<p>&nbsp;</p>
<p>- Produce a list with n identical elements:</p>
<p><pre class="brush: text">replicate' :: Int -&gt; a -&gt; [a] replicate' 0 x = [] replicate' (n&#43;1) x = x:replicate' n x</pre></p>
<p>&nbsp;</p>
<p>- Select the nth element of a list</p>
<p><pre class="brush: text">(!!@) :: [a] -&gt; Int -&gt; a (!!@) (x:_) 0 = x (!!@) (_:xs) (n&#43;1) = xs !!@ n</pre></p>
<p>&nbsp;</p>
<p>- Decide if a value is an element of a list:</p>
<p><pre class="brush: text">elem' :: (Eq a) =&gt; a -&gt; [a] -&gt; Bool elem' _ [] = False elem' x (y:ys) | x == y = True | otherwise = elem' x ys</pre></p>
<p>&nbsp;</p>
<p>2. Define a recursive function merge:: Ord a =&gt; [a] -&gt; [a] -&gt; [a] that&nbsp; merges two sorted lists to give a single sorted list.</p>
<p><pre class="brush: text">merge:: (Ord a) =&gt; [a] -&gt; [a] -&gt; [a] merge [] [] = [] merge xs [] = xs merge [] ys = ys merge (x:xs) (y:ys) | x &lt; y = x:merge xs (y:ys) | x == y = x:y:merge xs ys | otherwise = y:merge (x:xs) ys</pre></p>
<p>&nbsp;</p>
<p>3. Define a recursive function msort :: Ord a =&gt; [a] -&gt; [a] that&nbsp; implements merge sort</p>
<p><pre class="brush: text">msort :: (Ord a) =&gt; [a] -&gt; [a] msort [] = [] msort [x] = [x] msort xs = merge (msort ys) (msort zs) where [(ys,zs)] = halve xs halve :: [a] -&gt; [([a],[a])] halve [] = [] halve xs = [(take n xs, drop n xs)] where n = (length xs `div` 2)</pre></p>
<p>&nbsp;</p>
<p>posted by paks8150</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633931309880000000</link>
		<pubDate>Fri, 06 Nov 2009 19:03:08 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633931309880000000</guid>
		<dc:creator>paks8150</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Did anyone else do the first homework exercise (pythagoreans) and notice the following pattern:</p>
<pre>&gt; pyths 5
[(3,4,5),(4,3,5)]
&gt; pyths 55
[(33,44,55),(44,33,55)]
&gt; pyths 555
[(171,528,555),(180,525,555),(312,459,555),(333,444,555),(444,333,555),...]
</pre>
<p>&nbsp;</p>
<p>Freaky!</p>
<p>posted by JamieEi</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633949951560000000</link>
		<pubDate>Sat, 28 Nov 2009 08:52:36 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633949951560000000</guid>
		<dc:creator>JamieEi</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Why freaky? (k*3)^2 &#43; (k*4)^2 = (k*5)^2.</p>
<p>posted by raposatu</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633951298470000000</link>
		<pubDate>Sun, 29 Nov 2009 22:17:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633951298470000000</guid>
		<dc:creator>raposatu</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>My (sloppy) attempt at homework:</p>
<p>&nbsp;</p>
<p><pre class="brush: text">pyths hyp = [ (c1, c2) | c1 &lt;- [1..hyp-1], c2 &lt;- [1..hyp-1], c1*c1 &#43; c2*c2 == hyp*hyp ] perfects n = [ x | x &lt;- [1..n], x == sum (f x) ] where f n = [ x | x &lt;- [1..n-1], n `mod` x == 0 ] scalarProd xs ys = sum [ x*y | (x, ix) &lt;- zip xs
 [1..], (y, iy) &lt;- zip ys [1..], ix == iy] scalarProd_map xs ys = sum (map (\(x, y) -&gt; x * y) (zip xs ys))</pre></p>
<p>posted by raposatu</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633951299140000000</link>
		<pubDate>Sun, 29 Nov 2009 22:18:34 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c633951299140000000</guid>
		<dc:creator>raposatu</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 5 of 13</title>
		<description>
			<![CDATA[
<p>Hey,&nbsp;late as usual</p>
<p>&nbsp;</p>
<p>&nbsp;module Main( main, Main.sum, Main.zip ) where<br /><br />main = do&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print $ pyths 5<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $ perfects 500<br />--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $ Main.zip [4,5,6,7] [1,2,3]<br />--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $ Prelude.zip [4,5,6,7] [1,2,3]<br />--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $ Main.zip [1,2,3] [4,5,6,7]<br />--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $ Prelude.zip [1,2,3] [4,5,6,7]<br /><br />pyths :: Int -&gt; [(Int, Int, Int)]<br />pyths = \n -&gt; [(x, y, n) | x &lt;- [1..n], y &lt;- [1..n], (x*x &#43; y*y) == n*n]<br /><br />perfects :: Int -&gt; [Int]<br />perfects n = [x | x &lt;- [1..n], Main.sum (factors x) == x] <br /><br />factors :: Int -&gt; [Int]<br />factors = \n -&gt; [x | x &lt;- [1..n], x &lt; n &amp;&amp; n `mod` x == 0]<br /><br />sum :: [Int] -&gt; Int</p>
<p>sum [] = 0<br />sum&nbsp;(a:as) =&nbsp;a &#43; Main.sum as<br /><br />zip :: [Int] -&gt; [Int] -&gt; [(Int, Int)]<br />zip as bs = dropper (pairs as bs) (length bs)<br /><br />pairs :: [Int] -&gt; [Int] -&gt; [(Int, Int)]<br />pairs as bs = [(x,y) | x &lt;- as, y &lt;- bs]<br /><br />dropper :: [(Int,Int)] -&gt; Int -&gt; [(Int,Int)]<br />dropper []&nbsp;_ = []<br />dropper (a:as) n = [a] &#43;&#43; dropper (drop n as) n</p>
<p>&nbsp;</p>
<p>Sohail Qayum Malik</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>posted by Aeon</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c634054160250000000</link>
		<pubDate>Sun, 28 Mar 2010 23:33:45 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/C9-Lectures-Dr-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-5-of-13#c634054160250000000</guid>
		<dc:creator>Aeon</dc:creator>
	</item>
</channel>
</rss>