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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:56:04+00:00 2026-05-11T05:56:04+00:00

I wrote the function (defun test () (let ((str1 foo) (str2 bar)) (loop for

  • 0

I wrote the function

(defun test ()   (let ((str1 'foo') (str2 'bar'))     (loop for s in '(str1 str2) do (message s)))) 

but it does not work. The Elisp Backtrace message is:

Debugger entered–Lisp error: (wrong-type-argument stringp str1)

How can I make it work?

P.S.: the following modified version works perfectly, but I need the original version

(defun test1 ()   (loop for s in '('asdf' 'fdsa') do (message s))) 
  • 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. 2026-05-11T05:56:04+00:00Added an answer on May 11, 2026 at 5:56 am

    The quote operator (for which the apostrophe is syntactic sugar) means that its arguments are not evaluated, i.e. (quote (str1 str2)) returns a list of two symbols. Use list instead: (list str1 str2).

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

Sidebar

Related Questions

I wrote a test function to test my understanding of return-from in Lisp (defun
I wrote this quicksort function: (defun quicksort (lst) (if (null lst) nil (let ((div
I write this function, but what's its return value. (defn read-data [file] (let [code
I wrote this function for filling closed loop, pixvali is declared globally to store
I wrote a binary search function as part of a larger program, but it
I wrote this function that does this (easier to show than explain): (split 2
I have the following Common Lisp function: (defun get-positions (marker) (let ((result nil)) (dotimes
I wrote a quick sort function in clojure, but it runs extremely slow. Sometimes,
I wrote function onclick of a element <div class=left_collapsed>Որոնում</div> <div class=container style=display: none;> <ul>
I wrote following function void validateUser(void) { string uName; string uPassword; char c; map

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.