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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:29:02+00:00 2026-06-15T21:29:02+00:00

I try to run this code in clisp: (defun gen-world (loop for x to

  • 0

I try to run this code in clisp:

(defun gen-world
(loop for x to *hight*
    do (loop for y to *width*
        do (acons '(x . y) '(rock) *world*))))

And get the following error:

*** - APPLY: argument list given to SYSTEM::ERROR-OF-TYPE is dotted
  (terminated by
   "Invalid specialized parameter in method lambda list
   (LOOP FOR X TO *HIGHT* DO
    (LOOP FOR Y TO *WIDTH* DO (ACONS '(X . Y) '(ROCK) *WORLD*))): (LOOP FOR Y IN
      *WIDTH* DO (ACONS '(X . Y) '(ROCK) *WORLD*))"
   )

When I run

(acons '(x . y) '(rock) *world*)

I get no errors

Why do this happen?
EDIT: *hight* *width* and *world* are global and in scope. *world* is a list.

  • 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-15T21:29:03+00:00Added an answer on June 15, 2026 at 9:29 pm

    I can see two problems here.

    1. You are missing an argument list, so the LOOP form is taken as the argument list instead. And it happens to contain a dotted pair (X . Y) which is not allowed.
    2. Your key is a constant '(X . Y) when you probably wanted a pair containing the (integer) values of X and Y.

    Try this:

    (defun gen-world ()
        (loop for x to *hight*
            do (loop for y to *width*
                do (acons `(,x . ,y) '(rock) *world*))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to run this code, I get incorrect maximums and minimums. Could
This Java code compiles fine, but when I try to run it I get:
When I try to run this code Hello World print globals()[__doc__] Why do I
I get this error: Image When i try to run this code: strComputer =
I get index out of bounds exception when i try to run this code
When i try to run this code i get the error: Warning: mysql_fetch_array() expects
For some reason, when I try to run this code, all I get is
I have the given view and template code, when i try to run this
Thanks in advance. This is my sample code. Whenever i try to run it
I get this error FB is not defined when i try to run this

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.