School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,149 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,696 people online right now. Registration is fast and FREE... Join Now!




SKI combinatory logic in Scheme

 

SKI combinatory logic in Scheme, How do you make them using lambda abstractions?

Jaakuuta

22 Sep, 2009 - 04:58 AM
Post #1

D.I.C Head
Group Icon

Joined: 2 Jul, 2009
Posts: 162


Dream Kudos: 375
My Contributions
Hello all.
I came across a tutorial the other day that teaches about SKI combinatory logic as an extension to the Lambda Calculus.
The beginning of the tutorial says to load a specific file into the interpreter, but I don't have that file on my computer and I couldn't find a link to it.
Now I've gotten through the sections on currying and general combinators and I'm finally to the section where it talks about SKI combinators, but I'm not sure how to build them with lambda expressions.

This is what I'm thinking so far:

CODE

(define i (lambda (x) x))

(define k
  (lambda (x)
    (lambda (y) x)))

(define s
  (lambda (x y z)
    ((x z) (y z))))


I don't know if I'm anywhere close to being correct though.
I want to be able to use them like you would in a normal SKI combinator expression instead of having I or K apply to an argument before the S combinator can be applied, thus generating an arity-error.
If anybody can help with this, I'd greatly appreciate it and likely post it in one of my future tutorials on Scheme.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:30PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month