This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: optargs questions



David Lutterkort <lutter@cise.ufl.edu> writes:

> as expected, but with define* one gets an error:
> 
> guile> (define* (test w #&rest rest) `((w ,w) (rest ,rest)))
> ERROR: In procedure lambda in expression (lambda (w # rest . rest) (quasiquote #)):
> ERROR: bad formals
> ABORT: (misc-error)
> 

This is very easy to fix. I include the diff -c output at the end of this
message. 

Fixing the other points I raised in my previous mail involves a bit more
work ...

David

--- ../../../../stuff/scm/optargs.scm   Sun May 30 20:02:33 1999
***************
*** 317,323 ****
                                          (error "Too many arguments.")))
                                    '())
                              ,@BODY)))
!          `(lambda (,@ARGLIST . ,(if rest-arg rest-arg '())) 
              ,@BODY))))))
  
  
--- 317,323 ----
                                          (error "Too many arguments.")))
                                    '())
                              ,@BODY)))
!          `(lambda (,@non-optional-args . ,(if rest-arg rest-arg '())) 
              ,@BODY))))))
  
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]