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

  • Home
  • SEARCH
  • 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 9304715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:46:13+00:00 2026-06-18T23:46:13+00:00

In scheme which is a functional programming language, there is no assignment statement. But

  • 0

In scheme which is a functional programming language, there is no assignment statement.
But in a let statement

(let ((x 2))
    (+ x 3))

You are assigning 2 to x, so why doesn’t this violate the principle that there is no assignment statements in functional programming?

  • 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-06-18T23:46:14+00:00Added an answer on June 18, 2026 at 11:46 pm

    The statement “Scheme which is a functional programming language” is incorrect. In Scheme, a functional-programming style is encouraged, but not forced. In fact, you can use set! (an assignment statement!) for modifying the value of any variable:

    (define x 10)
    (set! x (+ x 3))
    x
    => 13
    

    Regarding the let statement of the question, remember that an expression such as this one:

    (let ((x 10))
      (+ x 3))
    => 13
    

    … it’s just syntactic sugar, and under the hood it’s implemented like this:

    ((lambda (x)
       (+ x 3))
     10)
    => 13
    

    Notice that a let performs one-time single assignments on its variables, so it doesn’t violate any purely functional programming principle per se, the following can be affirmed of a let expression:

    An evaluation of an expression does not have a side effect if it does not change an observable state of the machine, and produces same values for same input

    Also, quoting from Wikipedia:

    Impure functional languages provide both single assignment as well as true assignment (though true assignment is typically used with less frequency than in imperative programming languages). For example, in Scheme, both single assignment (with let) and true assignment (with set!) can be used on all variables, and specialized primitives are provided for destructive update inside lists, vectors, strings, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are a bunch of different Scheme interpreters available for the Mac: http://www.dmoz.org/Computers/Programming/Languages/Lisp/Scheme/Implementations/ Which
I have a Scheme assignment in which a user is to input a list
So i have been stuck trying to learn this Scheme language that i heard
I'm working on a Scheme assignment for school and there's a question involving us
I'm new to Scheme (via Racket) and (to a lesser extent) functional programming, and
My question is, which version-naming scheme should be used for what type of project.
I have this schema which I need to match 2 rows from user_data :
I have a table which have schema like this id name 1 jack 2
I've started learning Scheme, for fun mostly, and because I've never used a functional
I'm playing around with guile to try and get familiar with pure functional programming

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.