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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:34:38+00:00 2026-05-21T22:34:38+00:00

This piece of code is from book : Land Of Lisp First version is

  • 0

This piece of code is from book : “Land Of Lisp”
First version is from book. When I read it, i thought there are parenthesis “(” not necessary just before “at-loc-p” at 2nd line and “)” just after loc at 3rd line.

(defun person-at (loc pers per-locs)
       (labels ((at-loc-p (pers)
                 (eq (cadr (assoc pers per-locs)) loc)))
         (remove-if-not #'at-loc-p pers)))

But when I test this ,

(defun person-at (loc pers per-locs)
       (labels (at-loc-p (pers)
                 (eq (cadr (assoc pers per-locs)) loc))
         (remove-if-not #'at-loc-p pers)))

It came out :

Required arguments in AT-LOC-P don’t
match lambda list (CCL::FUNCNAME
CCL::LAMBDA-LIST
&BODY
CCL::LABELS-FUNCTION-BODY).
[Condition of type
CCL::SIMPLE-PROGRAM-ERROR]

I don’t quiete understand. Need help. thank you.

  • 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-21T22:34:38+00:00Added an answer on May 21, 2026 at 10:34 pm

    The LABELS in

    (defun person-at (loc pers per-locs)
      (labels ((at-loc-p (pers)
                 (eq (cadr (assoc pers per-locs)) loc)))
        (remove-if-not #'at-loc-p pers)))
    

    has the syntax labels ((function-name lambda-list [[local-declaration* | local-documentation]] local-form*)*) declaration* form*, so you will have to provide a list of local function definitions for it to work.

    Since those local function definitions are themselves parenthesized, you will have to pass labels a list of this structure: ((fun1 (...) ...) (fun2 (...) ...) ...).

    Unfortunately, the stack trace and error message aren’t very helpful in spotting the error here, since the message does not tell you that the problem is with labels, and it also isn’t topmost in the trace. The 4: (CCL::NX1-LABELS ... would be a hint (debugger buffer on my local machine).

    Take a look at the documentation for labels in the Hyperspec to learn more.

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

Sidebar

Related Questions

I have the following piece of code from a book. There is this function
I do not understand how this piece of code (from Wikipedia) works: template <int
I got this piece of code from a book viz. sams teach yourself android
I am not sure which version of Fortran is this piece of code, also
this piece of code was given in a book. $query=select name, description from widget
I wrote this simple test code, by adapting a piece from a book, to
I'm trying to compile this piece of code from the book The C Programming
Ok i have this piece of code from which i took from W3schools :-
I am using iTextSharp in VB.net. I have this piece of code from java
This piece of code is from Adobe docs : package { import flash.display.Loader; import

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.