Re: Convert scheme to lisp



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?))

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


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.



Relevant Pages

  • Re: Convert scheme to lisp
    ... I'm trying to translate a small scheme library to common lisp and came ... (define node-self filter) ... and I think it does what I want but I get compile warnings that node- ... Depends a lot on how node-self gets used in the program; ...
    (comp.lang.lisp)
  • Re: Convert scheme to lisp
    ... I'm trying to translate a small scheme library to common lisp and came ... (define node-self filter) ... IMHO, you shouldn't declaim things about other people's code, because you never know what they want to do with such code internally. ...
    (comp.lang.lisp)
  • Re: Convert scheme to lisp
    ... I'm trying to translate a small scheme library to common lisp and came ... (define node-self filter) ... and I think it does what I want but I get compile warnings that node- ...
    (comp.lang.lisp)
  • Convert scheme to lisp
    ... I'm trying to translate a small scheme library to common lisp and came ... (define node-self filter) ... and I think it does what I want but I get compile warnings that node- ...
    (comp.lang.lisp)
  • Re: Bodes Amplitude/Phase relation for discrete time systems
    ... Transformations", and they just call it the 'w plane'. ... since the end target is DT the up front spec is also DT. ... CT filter. ... It never got popular in large part because with a bit of effort most of the Laplace-domain techniques have cognates in the z domain (Bode and Nyquist plots, in particular, translate straight across). ...
    (comp.dsp)