Re: Convert scheme to lisp



On Fri, 03 Aug 2007 18:30:05 +0200, Pascal Costanza wrote:

Andy Chambers wrote:
Hi,

I'm trying to translate a small scheme library to common lisp and came
across something I'm not sure how to translate.

Given the definition,

(define (filter pred?)
.....)

the scheme library defines what looks like an alias

(define node-self filter)


I tried

(setf (symbol-function 'node-self)
(function filter))

and I think it does what I want but I get compile warnings that node-
self isn't defined. Is there another way of doing this that avoids
the warnings?

(declaim (inline node-self))
(defun node-self (pred?)
(filter pred?))

Hmm - either this was typed too fast or i miss something ... shouldn't
that be:

(declaim (inline filer))
(defun node-self (pred?)
(filter pred?))


Cheers, Ralf Mattes

The other suggestions to use defvar or defparameter lead in the wrong
direction.


Pascal

.