[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sublis working?



In article <D0o9M3.Ltz@undergrad.math.uwaterloo.ca>, wewallac@watcgl.uwaterloo.ca (Bill Wallace) writes:
>Could someone test to see if sublis works (p 425 cltl2)?  If anyone has
>written an efficient version of it, I would appreciate a fixed copy,
>or some comments on what I am doing wrong.  I have tried:
>
>(sublis '((a.b) (c.d))  '(a b c d e))
>and it returns
>'(a b c d e)
>

In your example SUBLIS looks for 'a.b in the tree ...

(sublis '((a.b) (c.d)) '(a.b c.d))  ->  (NIL NIL)    :)

The right form for the a-list is '((a . b) (c . d))

 -Nummi