<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason Rowe &#187; Lambda</title>
	<atom:link href="http://jasonrowe.com/tag/lambda/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonrowe.com</link>
	<description>enjoying the web</description>
	<lastBuildDate>Sun, 13 May 2012 14:05:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Turing&#8217;s Lambda Notation</title>
		<link>http://jasonrowe.com/2009/09/05/turings-lambda-notation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=turings-lambda-notation</link>
		<comments>http://jasonrowe.com/2009/09/05/turings-lambda-notation/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 06:50:26 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Lambda]]></category>

		<guid isPermaLink="false">http://jasonrowe.com/?p=642</guid>
		<description><![CDATA[I&#8217;m still working through Turing&#8217;s paper on Computability and the Turing Machine.  I am at the end and reading the appendix on Alonzo Church&#8217;s equivalent approach using Lambda Calculus.   His work is so familiar to most programmers since we &#8230; <a href="http://jasonrowe.com/2009/09/05/turings-lambda-notation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[I&#8217;m still working through Turing&#8217;s paper on Computability and the Turing Machine.  I am at the end and reading the appendix on Alonzo Church&#8217;s equivalent approach using Lambda Calculus.   His work is so familiar to most programmers since we use the concepts in C, C++, Java, and C#.   I decided to use C# Lambda syntax to get familiar before reading through the rest of the paper.

<a rel="attachment wp-att-658" href="http://jasonrowe.com/2009/09/05/turings-lambda-notation/lambda_math_syntax-2/"><img class="alignnone size-full wp-image-658" title="lambda_math_syntax" src="http://jasonrowe.com/wp-content/uploads/2009/09/lambda_math_syntax.PNG" alt="lambda_math_syntax" width="537" height="136" /></a>

I started simply and considered how I could make the following expression be represented by M.

<strong>Math.Pow(x, 2.0) + 5 * x + 7</strong>

Most commonly we see it in this form when programming.

<pre class="brush: csharp; title: ; notranslate">

static double F(double x)
{

return Math.Pow(x, 2.0) + 5 * x + 7;

}

</pre>

So convert it to a lambda expression.

<pre class="brush: csharp; title: ; notranslate">

OneV firstExp = x =&gt; Math.Pow(x, 2.0) + 5 * x + 7;

</pre>

where OneV is defined as (not suprisingly)

<pre class="brush: csharp; title: ; notranslate">

delegate double OneV(double x);

</pre>

In C# the two variable syntax could be something like this:

<pre class="brush: csharp; title: ; notranslate">

TwoV Exp = (x, y) =&gt; Math.Pow(y, 2.0) + 5 * y + 18 * x + 2 * x * y + 7;

</pre>

So thats how I got my head around the very basic syntax.]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2009/09/05/turings-lambda-notation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

