Roger Costello
Roger Costello

Reputation: 3209

Convert a Scheme constant to the equivalent Common Lisp

I am converting some Scheme code to Common Lisp. I don't know Scheme. I know a bit of Common Lisp.

I think this Scheme is defining a constant:

(define nothing #(*the-nothing*))

What is that # symbol doing? Why is it there?

I think this is the Common Lisp equivalent, but honestly I'm not sure:

(defconstant nothing '*the-nothing*)

Upvotes: 2

Views: 92

Answers (1)

C. K. Young
C. K. Young

Reputation: 223013

In both Scheme and Common Lisp, #(...) is read syntax for a vector. In this case, it's a vector containing 1 element, the symbol *the-nothing*.

Upvotes: 4

Related Questions