-3

So I read that DrRacket is a good IDE for common lisp. I downloaded it and have set the language as R5RS and written the following function definition:

(defun f (x)
  (+ 5 5))

However it's returning an error

defun: undefined;
 cannot reference undefined identifier

And I have no clue how to fix it, considering that defun is a well established keyword in common lisp.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Ren
  • 4,594
  • 9
  • 33
  • 61
  • Can you provide a reference where you read that "Dr.Racket is a good IDE for Common Lisp"? Even if it did provide support for Common Lisp, [R5RS](http://www.schemers.org/Documents/Standards/R5RS/) is a version of Scheme, not Common Lisp. – Joshua Taylor Feb 23 '14 at 00:46

1 Answers1

9

DrRacket is NOT an IDE for common lisp. It's an IDE for scheme, which is a Lisp dialect, but different from Common Lisp.

The right syntax for your snippet in scheme would be:

(define (f x)
  (+ 5 5))
Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
b2Wc0EKKOvLPn
  • 2,054
  • 13
  • 15
  • Even when I write `define` it's giving me the same error, also, in that case, what is a good free IDE for common lisp? – Ren Feb 22 '14 at 18:45
  • 1
    there are free versions of commercial IDE like [LispWorks](http://www.lispworks.com/downloads/). Otherwise, there's also [lispbox](http://common-lisp.net/project/lispbox/) which is a preconfigured version of emacs and slime. – b2Wc0EKKOvLPn Feb 22 '14 at 18:52