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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:17:13+00:00 2026-06-14T08:17:13+00:00

if pair end with a space char, why result value contains one dot(.)? what

  • 0

if pair end with a space char,
why result value contains one dot(.)?
what does this dot(.) mean?

(cons 1 2 )
;Value 2: (1 . 2)

(car (cons 1 2 ))
;Value: 1

(cdr (cons 1 2 ))
;Value: 2

this one seems stupid, because pair only contain two element.

i just want to know why the first expression echo one dot in the result!

(cadr (cons 1 2 ))
;The object 2, passed as an argument to safe-car, is not a pair.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

thanks!

  • 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-14T08:17:14+00:00Added an answer on June 14, 2026 at 8:17 am

    CONS constructs a pair. A pair of two things. It is written as (firstthing . secondthing).

    If the second thing is an empty list, it is written as (firstthing). It is the same as (firstthing . ()).

    Since cons constructs a cons, the result of (cons 1 2) is (1 . 2).

    (cadr (cons 1 2)) is an error. It is (car (cdr (cons 1 2)). (cdr (cons 1 2) is 2. Now (car 2) is wrong. You can’t take the car of 2. 2 is a number, not a cons.

    If you want to create a list, which is made of cons cells or the empty list, then use the function list.

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

Sidebar

Related Questions

I could use another pair of eyes. This script does what I want in
how do I format output in seconds:milliseconds format? TimeSpan start = TimeSpan.Parse(pair.Value[3]); TimeSpan end
I have a pair of static fields with a complicated one-time initialization. I want
I've written a pair of AES encrypt/decrypt functions based on this example . It
I would like to have a pair of TextFields depending on a value. And
I'm trying to implement a method which returns a boost::filter_iterator pair (begin, end). I
I need another (dozen) pair of eyes on this. The following code: Interface iRuleEntity
I'm using a pair of python programs, one of which should call the second.
I have a pair of Rails helpers, one of which is meant to accept
Have an array of single pair hashes, like this: arguments = [{:name=>ABCD},{:title=>Awesome},{:number=>4}] I need

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.