gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: [Maxima] Destructuring-bind


From: Camm Maguire
Subject: [Gcl-devel] Re: [Maxima] Destructuring-bind
Date: 15 Feb 2002 12:02:39 -0500

Greetings!  Yes, my apologies, my mistake -- I just copied the text
from the spec without altering for my different iota.

The problem is that this code gives NIL in place of BEE.  Anyone know
why? 

Take care,


Richard Fateman <address@hidden> writes:

> I assume you mean the correct answer to be (alpha bee 5 4 3)
> which is what Allegro CL gives.
> RJF
> 
> 
> Camm Maguire wrote:
> 
> > Greetings!  As you may know, I lifted the destructuring-bind James had
> > setup in maxima and added it to gcl-2.5.0.
> > 
> > Problem is, it doesn't quite give the correct  result for the example
> > listed in the ansi hyperspec.  To wit:
> > 
> > (defun iota (n) (list n (+ n 1) (+ n 2)))
> > 
> > IOTA
> > Top level.
> > 
> >>     (destructuring-bind ((a &optional (b 'bee)) one two three)
> >>
> >           `((alpha) ,@(iota 3))
> >         (list a b three two one))
> > 
> > (ALPHA NIL 5 4 3)
> > 
> > (not (ALPHA BEE 3 2 1))
> > 
> > I've included the code below.  Could some lisp hacker spot the error?
> > 
> > Take care,
> > 
> > 
> > 
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

[Prev in Thread] Current Thread [Next in Thread]