Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7566299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:22:39+00:00 2026-05-30T14:22:39+00:00

In Lambda calculus, Y -combinator returns itself like this Y a = a Y

  • 0

In Lambda calculus, Y -combinator returns itself like this Y a = a Y a, specifially here. Suppose some trivial function such as y(x)=2*x+1 (suppose Church numbers for the sake of simplicity) and I want to do it Y y to which I want some sort of break-out -function. I want to do something like this

  1. calculate y(1) —>3
  2. calculate y(3) —>7
  3. calculate y(7) …
  4. …
  5. terminate on the n-th case

How can I do this in R using the functional way of thinking? Is there something built-in?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:22:40+00:00Added an answer on May 30, 2026 at 2:22 pm

    I don’t really understand the notation of the lambda calculus, so can’t know for sure what the Y-combinator is, but I wonder if the R function Recall() (help page here) wouldn’t help you build what you’re after. Here is an example of its use to calculate a factorial:

    # Calculate 4!
    (function(n) {if (n<=1) 1 else n*Recall(n-1)})(4)
    

    And here it is applied to the example you described:

    (function(x, n) {if (n<=1) x else Recall(2*x+1, n-1)})(x=1, n=1)
    # [1] 1
    (function(x, n) {if (n<=1) x else Recall(2*x+1, n-1)})(x=1, n=2)
    # [1] 3
    (function(x, n) {if (n<=1) x else Recall(2*x+1, n-1)})(x=1, n=3)
    # [1] 7
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to understand the basics of lambda calculus and Church numerals. I have
I have a simple lambda expression that goes something like this: x=> x.Lists.Include(l =>
I have some GADT which represents a term in the lambda-calculus. data Term a
in lambda calculus (λ x. λ y. λ s. λ z. x s (y
To all the people who know lambda calculus : What benefit has it bought
So the Wikipedia entry on Lambda Calculus was interesting but I've finished it. I
Why does this lambda expression not compile? Action a = () => throw new
It's possible to encode various types in the untyped lambda calculus through higher order
I am working on the exercise questions of book The Lambda calculus . One
I'm creating a lambda function that executes a second function with a concrete params.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.