Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
closure
david
Send A Message
Rating
9.00
out of 10
( 1 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
Scheme
Posted 333 Days Ago
253 Views
Received 1 Rating
More Codes By This Author
Solving the N-Queens-Prob...
Recursive Lambdas with th...
down the tree
simple constraint problem...
Articles By This Author
N-Queens-Series Part I (O...

Recursive Lambdas with the Y and U Combinator


Description
In scheme you meet recursion almost anywhere. It's a natural thing, that can be naturally expressed in this language. There is one exception though. I'm talking of lambdas, that are by nature anonymous
and thus have no name that could be used to call itself, thus recursively calling itself.

The lambda-calculus however shows that it is indeed possible to do such things.
The code that is presented here is nothing new, and widely known among the lispers but
it may be interesting for any of you who didn't yet get in touch with the language too much.

For those of you who want to know the formal definition of the Y-Combinator, here it is:
Y = λf.(λx.f (x x)) (λx.f (x x))

For further information and a more indepth explanation see: http://www.ece.uc.edu/~franco/C511/html/Scheme/ycomb.html
Source Code
Comments
Please login to post comments.
Page 1 of 1
More "Scheme" Source Codes By This Author
Recently Posted "Scheme" Source Codes
Recently Rated "Scheme" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
What would you rate the usability of Coder Profile?

9 to 10
7 to 8
5 to 6
3 to 4
1 to 2


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
5 Days Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved