0
votes

When I try to execute this code:

((lambda (a) (cons (quote a) a)) ’(d a b))

I get an error:

’: unbound identifier in module in: ’

Can someone explain this for me please?

1

1 Answers

4
votes

It's a simple error, instead of the ’ character you must use ' for quoting. It's possible that you copy-pasted the wrong character from somewhere else! Copy the code from here and you'll see that it works:

((lambda (a) (cons (quote a) a)) '(d a b))
=> '(a d a b)