1

I started learning LISP and I heard that there is some kind of a trick to do recursion without using lables (only using : quote,atom,eq,car,cdr,cons,cond).

I gave it some thought but I can't think of a way doing this since the function I defined has no name.

I'm guessing its done using cond by I don't really see how...

[the question is how to implement recursion with the limitations as stated above]

1 Answer 1

5

For anonymous recursion, you're going to need a fixed-point combinator, the most famous of which is known as the Y combinator. Richard Gabriel's "Why of Y" is a good article which derives and justifies Y in Scheme.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.