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 3948938
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:26:03+00:00 2026-05-20T01:26:03+00:00

It is easy to express and , or , and not in terms of

  • 0

It is easy to express and, or, and not in terms of if (with an assist from a local binding for or). I’d like to know if the reverse is true. My naïve first attempt:

(if test conseq altern) => (or (and test conseq) altern)

However, if test is non-#f and conseq is #f, the translation evaluates to altern, which is incorrect.

Is there a translation that evaluates to the correct value while maintaining the short-circuit nature of if?

  • 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-20T01:26:04+00:00Added an answer on May 20, 2026 at 1:26 am

    Sounds like you have a good explanation why if is doing a little more than and and or. But if you could cheat and add a lambda to delay the actual result:

    (define-syntax-rule (if c t e) ((or (and c (lambda () t)) (lambda () e))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sounds easy, but I've got a bug and I'm not sure what's causing it?
any easy to use utility/tool/profiler/benchmark that able to test what is the maximum users
Debug HTTP is easy, you have all sort of tools to do it (like
Is it safe to do something like this in Node.js/Express.js? // use Object.create(null) so
I'm trying to migrate my code from VSC++ 6 to VSC++ 2008 express edition
First a little introduction. We have an SQL Server Express 2008 database, which schema
Is there an easy way to lock a sql server express 2005 so that
I have simple OneToOne relationship: Data <-> TherapyResult I would like to express the
I'm not sure, will the visual c ++ compiler express edition work for compiling
Bit of a newbie question here. In VC# 2010 Express, is there an easy

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.