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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:09:34+00:00 2026-06-02T12:09:34+00:00

It seems that Common Lisp does treat (list ‘quote ‘x) in a special way.

  • 0

It seems that Common Lisp does treat (list 'quote 'x) in a special way. For example, the value of (list 'oddp '5) is '(oddp 5) while the value of (list 'quote '5) is ''5. In other words, the quote function seems to be evaluated even though it should be in data mode due to the quote in front of it.

Compare the value of the following expressions:

    1. (list 'quote '5) = (list 'quote 5) = (quote '5) = ''5
    2. (list '' '5) = '(''5)
    3. (list ' 5) = (list 5) = '(5)
    4. (list 'oddp '5) != (oddp 5)

The evaluation appears to be very idiosyncratic. But I reckon that I might be very confused.

Can someone help me to better understand the pattern here?

  • 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-02T12:09:35+00:00Added an answer on June 2, 2026 at 12:09 pm

    What does = mean? You might use it for two different things: equality after read and equality after evaluation. Btw., in Lisp itself the function = compares numbers.

    The first step is reading:

    (list 'quote '5) read > (LIST (QUOTE QUOTE) (QUOTE 5))

    (list '' '5) read > (LIST (QUOTE (QUOTE (QUOTE 5))))

    (list ' 5) read > (LIST (QUOTE 5))

    (list 'oddp '5) read > (LIST (QUOTE ODDP) (QUOTE 5))

    Now ' is a read macro. It transforms the next textual form. 'someform is just read as (QUOTE SOMEFORM). The printer may retransform this when printing it. Note how it interacts with pretty printing. The following example is in LispWorks:

    CL-USER 50 > '(QUOTE SOMEFORM)
    (QUOTE SOMEFORM)
    
    CL-USER 51 > (setf *print-pretty* t)
    T
    
    CL-USER 52 > '(QUOTE SOMEFORM)
    'SOMEFORM
    

    Note also that the quote readmacro character ' reads over whitespace.

    '5 is read the same as for example ' 5 .

    But it is good style to put the quote directly in front of the next expression, without whitespace.

    The second step is evaluation:

    (LIST (QUOTE QUOTE) (QUOTE 5)) eval > (QUOTE 5) prettyprint > '5

    (LIST (QUOTE (QUOTE (QUOTE 5)))) eval > ((QUOTE (QUOTE 5))) prettyprint > (''5)

    (LIST (QUOTE 5)) eval > (5)

    (LIST (QUOTE ODDP) (QUOTE 5)) eval > (ODDP 5)

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

Sidebar

Related Questions

It seems that a common way to make a text behave like a link
I am building a Rails app, and it seems that common practice is to
It seems that the following is a common method given in many tutorials on
I have a fairly involved LispWorks Common Lisp module that sits atop some .NET
I am teaching myself Common Lisp and I'm creating a simple program that interfaces
It seems that common logging pattern in scala is to use a Logging trait
In Javascript, it seems like using property accessors is not all that common (unlike
Does REMOVE ever return the same sequence in any real implementations of Common Lisp?
It seems that the common theme among SO questions regarding WatiN have to do
I am having a very common problem which it seems that all the available

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.