EQ newbie question

Discussion of Common Lisp
smithzv
Posts: 94
Joined: Wed Jul 23, 2008 11:36 am

Re: EQ newbie question

Post by smithzv » Sat Jul 30, 2011 7:42 am

sylwester wrote:Another relic from that paper that is somewhat useless today but still part of CLISP is atom.
You find ATOM to be useless?

Code: Select all

#'atom == (lambda (x) (not (consp x)))
I find I use it all the time when traversing a syntax tree.

sylwester
Posts: 133
Joined: Mon Jul 11, 2011 2:53 pm

Re: EQ newbie question

Post by sylwester » Mon Aug 01, 2011 5:46 pm

smithzv wrote:
sylwester wrote:Another relic from that paper that is somewhat useless today but still part of CLISP is atom.
You find ATOM to be useless?

Code: Select all

#'atom == (lambda (x) (not (consp x)))
I find I use it all the time when traversing a syntax tree.
Not useless as a function but, like eq, has a misguiding name. Must say I prefer (not(consp x)) any day.
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p

Post Reply