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

Related Questions

Ok I have the following, set-up and working great. These lines of code should
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following Code Block Which I tried to optimize in the Optimized section
I am trying to port this algorithm to clojure. My code is (defn calc-iterations
I have the following code which throws an exception (detail in code comments below).
I have the following code: string acctStatus = account.AccountStatus.ToString(); if (!SettableStatuses().Any(status => status ==
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following string String str = replace :) :) with some other string;
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I have following situation. A main table and many other tables linked together with

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.