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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:29:17+00:00 2026-05-10T22:29:17+00:00

I have the following Clojure code and I’m not sure why it’s not working:

  • 0

I have the following Clojure code and I’m not sure why it’s not working:

(defn match (x y &optional binds)   (cond    ((eql x y) (values binds t))    ((assoc x binds) (match (binding x binds) y binds))    ((assoc y binds) (match x (binding y binds) binds))    ((var? x) (values (cons (cons x y) binds) t))    ((var? y) (values (cons (cons y x) binds) t))    (t     (when (and (consp x) (consp y))       (multiple-value-bind (b2 yes)                            (match (car x) (car y) binds)         (and yes (match (cdr x) (cdr y) b2))))))) 

(The code is translated from Paul Graham’s ANSI Common Lisp book.)

When I run it, I get the following error:

java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol clojure.lang.Compiler$CompilerException: NO_SOURCE_FILE:2: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol         at clojure.lang.Compiler.analyze(Compiler.java:3713)         at clojure.lang.Compiler.analyzeSeq(Compiler.java:3848)         at clojure.lang.Compiler.analyze(Compiler.java:3698)         at clojure.lang.Compiler.access$200(Compiler.java:37)         at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:343)         at clojure.lang.Compiler.analyzeSeq(Compiler.java:3858)         at clojure.lang.Compiler.analyze(Compiler.java:3698)         at clojure.lang.Compiler.analyzeSeq(Compiler.java:3848)         at clojure.lang.Compiler.analyze(Compiler.java:3698)         at clojure.lang.Compiler.analyze(Compiler.java:3671)         at clojure.lang.Compiler.eval(Compiler.java:3895)         at clojure.lang.Repl.main(Repl.java:75)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)         at java.lang.reflect.Method.invoke(Unknown Source)         at jline.ConsoleRunner.main(ConsoleRunner.java:69) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol         at clojure.lang.LazyCons.rest(LazyCons.java:64)         at clojure.lang.ASeq.count(ASeq.java:85)         at clojure.lang.RT.count(RT.java:486)         at clojure.lang.Cons.count(Cons.java:41)         at clojure.lang.Compiler.analyze(Compiler.java:3695)         ... 16 more Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol         at clojure.lang.LazyCons.first(LazyCons.java:44)         at clojure.lang.LazyCons.rest(LazyCons.java:59)         ... 20 more Caused by: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol         at clojure.lang.RT.seqFrom(RT.java:465)         at clojure.lang.RT.seq(RT.java:448)         at clojure.seq__28.invoke(boot.clj:92)         at clojure.every_QMARK___596.invoke(boot.clj:1180)         at clojure.fn__1147$psig__1149.invoke(boot.clj:2155)         at clojure.map__602$fn__605.invoke(boot.clj:1214)         at clojure.lang.LazyCons.first(LazyCons.java:40)         ... 21 more 

What am I doing wrong 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. 2026-05-10T22:29:17+00:00Added an answer on May 10, 2026 at 10:29 pm

    The problem is that I’m using parentheses (‘(‘ and ‘)’), rather than square brackets (‘[‘ and ‘]’), for the arguments list.

    It should start out like this:

    (defn match [x y &optional binds] 

    (I found the answer in Programming Clojure by Stuart Halloway.)

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

Sidebar

Ask A Question

Stats

  • Questions 57k
  • Answers 57k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I just discovered this behavior (by accident thanks to a… May 11, 2026 at 8:29 am
  • added an answer You should not urlencode the entire querystring, just the values,… May 11, 2026 at 8:29 am
  • added an answer Inner classes (like Button.ClickEvent) need a reference to an instance… May 11, 2026 at 8:29 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

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

Related Questions

Loading...

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.