RE: bug involving assert-equals? and map

Ryan Culpepper <ryan_sml-/[email protected]> Thu, 9 Sep 2004 18:29:04 -0700 (PDT)
Newsgroups gmane.lisp.scheme.plt.schematics
Message-ID <[email protected]>
--- Anton van Straaten <[email protected]> wrote:

> Aureliano Calvo wrote:
> > I've just download the latest snapshot using CVS.
> > Executing (map assert-equal? '(1) '(1)) on DrScheme
> > (using the PrettyBig Language) gives this error:
> >
> > assert-equal?: bad syntax in: assert-equal?
> >
> > But (assert-equal? 1 1) works fine.
> >
> > This bugs breaks the matrix-test.ss test on the
> > schemathics module.
> >
> > I'm a beginner with scheme, so I don't know how to
> > correct the macros involved.
> 
> Scheme doesn't allow you to use macros directly with 'map'.  The
> first
> argument to map has to be a procedure, whereas (I assume)
> assert-equal? is a
> macro.  So, you should be able to do this:
> 
> (map (lambda (a b) (assert-equal? a b)) '(1) '(1))

As an alternative, we could use identifier macros to turn other
occurrences of assert-equal? into functions like the one above. I'll
try to add that and check it in tonight. That will also eliminate the
need for the assert-equal?* variant, if that's still around.

Any objections?

Ryan



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php