EQ newbie question

Discussion of Common Lisp

Re: EQ newbie question

Postby 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.
smithzv
 
Posts: 94
Joined: Wed Jul 23, 2008 11:36 am

Re: EQ newbie question

Postby 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
sylwester
 
Posts: 84
Joined: Mon Jul 11, 2011 2:53 pm

Previous

Return to Common Lisp

Who is online

Users browsing this forum: Google [Bot] and 2 guests