Since (?:ECMA|Java)script supports closures, it is Lambda-calculus ready. I googled examples but there seems none so I made one.
Welcome to the world of λ!
Source:
// define var zero = function(f){ return function(x){ return x}}; var succ = function(n){ return function(f){ return function(x){ return f(n(f)(x))}}}; var add = function(m){ return function(n){ return function(f){ return function(x){ return m(f)(n(f)(x))}}}}; var mul = function(m){ return function(n){ return function(f){ return m(n(f))}}}; var pow = function(m){ return function(n){ return n(m)}}; // execute function $(id){ return document.getElementById(id) }; var one = succ(zero); var two = succ(one); var four = add(two)(two); var eight = mul(two)(four); var sixteen = pow(two)(four); var numbers = [one, two, four, eight, sixteen]; $('result').innerHTML = ''; for (var i = 0; i < numbers.length; i++){ var n = numbers[i]; $('result').innerHTML += numbers[i](function(n){return 1+n})(0); $('result').innerHTML += ' = '; $('result').innerHTML += numbers[i](function(n){return '(1+' + n + ')'})(0); $('result').innerHTML += '<br />'; }Show me!
Also note that this example contains no <script> tag but the "Show Me!" still works. Trick? onclick="eval(document.getElementById('lambda').firstChild.nodeValue)"
.
Don't you love dynamic lanugages?
Dan the (?:ECMA|Java)scripting Lambacamel
Managed Hosting, Colocation and Data Center Services by victoryushchenkonashpresudent ...
Posted by: Robert | Friday, 27 July 2007 at 07:43
The Iraqi government says guards from US security firm Blackwater killed more people than previously thought.
Posted by: Maxim | Tuesday, 09 October 2007 at 12:41
Good news!
Posted by: BRADLEY Elijah | Friday, 12 October 2007 at 08:57
bla
Posted by: bla | Thursday, 13 December 2007 at 07:22
H!, nice day, look this:
Netvouz is a social bookmark manager where you can store your favorite links online and access them from any computer.
End ^) See you
Posted by: DEREK Flo | Friday, 08 February 2008 at 06:02
Hello,
Not sure that this is true) but thanks
Have a nice day
Hobosic
Posted by: Hobosic | Thursday, 05 February 2009 at 16:39
Thank for sharing the great script :-)
Posted by: work at home | Wednesday, 25 March 2009 at 10:46
thanks for sharing the great script.
Posted by: work at home | Wednesday, 25 March 2009 at 10:48
Hi, It's the second time i'm posting you without a reply. I found your site using Yaehoo, does your site support firefox?
Posted by: Yaehoo | Friday, 01 May 2009 at 11:48
Hi, It's the second time i'm posting you without a reply. I found your site using Yaehoo, does your site support firefox?
Posted by: Yaehoo | Friday, 01 May 2009 at 11:48
rmgnHh viTwQ937Baww5mLp1oWxu
Posted by: molly | Tuesday, 18 August 2009 at 17:17
Well, the most astonishing fact is the script-less approach.
Posted by: evalinux.wordpress.com | Tuesday, 15 September 2009 at 14:48
Why stop with Church numerals?
You can do the Y combinator:
http://matt.might.net/articles/implementation-of-recursive-fixed-point-y-combinator-in-javascript-for-memoization/
Now you don't need recursion or loops!
Posted by: Matt Might | Sunday, 20 September 2009 at 12:29
We can just only imagine about such great talent in thesis papers related to this good topic writing. I unremarkably take the aid of the reliable dissertation service. In such situation it fits me perfectly.
Posted by: hy31Olivia | Saturday, 09 January 2010 at 01:26
coCI2X Excellent article, I will take note. Many thanks for the story!
Posted by: 1267880153 | Saturday, 06 March 2010 at 22:06
Hi;
little bit late in the party :)
well i just recently update win 7, and i also update driver on gt220 from 7.15 to 8.15. and now i experienced first glitch screen then black death screen.
i reboot my pc, this time it happens during welcome screen.
i again reboot my pc in safe mode and went to device manager and roll back the diplay driver.
it works fine but when i try to go in nvidia control panel. i get this message:
The NVIDIA Dispay Panel extension cannot be created.
Possible reason include:
Version mismatch. Reinstalling display drivers may solve this problem.
i have not yet try 8.16 & 9.1.
Posted by: buy cialis | Wednesday, 28 April 2010 at 03:30
This was a little hard for me to piece together. I apologize if I'm misunderstanding any of it.
Sex is a really touchy analogy. Lots of really smart people have gone on at great length about it as a root cause for various things. With the advantage of our current cultural fixation on it, it's not too hard to see that this is terribly wrong. Sex is rather empty and kind of difficult to even pull off without attraction. And attraction is an effect caused by a rather wholistic view of someone. No single value is enough to make you think "OMG, I want, let's run off and SPAWN together!" Sex is not a cause at all, it's the reaction to the effect of being attracted. The root cause is your understanding of the person you're attracted to.
The parallels you're drawing with fantasy make sense to me this way too. The reaction is the power creep. The reaction has to scale in some fashion we can understand based on the original input (not many people would buy a D&D expansion called The Penultimate Guide to Being the Untouchable Godly Overlord of All You Survey, not even if the package included a Hostess twinkie). The root causes are creative impulses and the desire to share them. The effect is the game. The cooperatively told story. Structuring within the story is used to help convey more accurately, to make them easier to understand. Roleplaying games have this in
common with other forms of storytelling. The rule sets, which are unique to gaming, are there to help share the storytelling, because the game master tells the overall story and narrates but the players all tell the story of their characters.
Posted by: sildenafil citrate | Wednesday, 28 April 2010 at 09:36
Hallo,
ich kam durch Zufall auf diese Seite und möchte einen netten Gruß hinterlassen. Ich würde mich freuen, wenn ihr auf meiner Homepage auch einmal vorbei schauen würdet! Vielleicht wollt ihr einmal auf Sylt Westerland oder an der Ostsee Urlaub machen?! Wir haben dort sehr schöne Meerblickwohnungen. Vielleicht bis bald einmal!
Herzliche Grüße
http://www.OstseeblickHolm.de
Posted by: Werner | Thursday, 27 May 2010 at 04:43
it works fine but when i try to go in nvidia control panel. i get this message
Posted by: ativan buy | Sunday, 20 June 2010 at 22:54
oh interesting! that's quite an information there and i think it IS a site that is to be reckoned with if you own a small business and you need to be on top of what people are saying about you now
Posted by: 4 week cna classes | Tuesday, 20 July 2010 at 17:04
oh interesting! that's quite an information there and i think it IS a site that is to be reckoned with if you own a small business and you need to be on top of what people are saying about you now.
Posted by: Website Design and Maintenance Agreement | Tuesday, 17 August 2010 at 16:07
This looks like a wonderful place to relax. I too enjoy the process of watching the seedings grow. Your work is breath-taking. Good luck at renagade. =)I am pleased to say it is interesting that this blog has a great variety of viewpoints to better understand the situation and that is what most caught my attention and has a great variety of comments
Posted by: viagra online | Thursday, 19 August 2010 at 03:33
Really interesting article content. the info that you shown is amazing and most prominently i liked the way you shared things here.
Posted by: Dana | Tuesday, 18 January 2011 at 02:52
Your work is breath-taking. Good luck at renagade. =)I am pleased to say it is interesting that this blog has a great variety of viewpoints to better understand the situation and that is what most caught my attention and has a great variety of comments
Posted by: custom football jersey | Wednesday, 19 January 2011 at 12:31
Johny Long
I think I acknowledged your point @ 1:25, right?
Posted by: cna classes in louisville ky | Wednesday, 19 January 2011 at 19:41