[Top][All Lists]

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

Re: srfi-1 map implementation

From: Marius Vollmer
Subject: Re: srfi-1 map implementation
Date: 28 Jan 2002 19:44:27 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Martin Grabmueller <address@hidden> writes:

> > I'd say that for the specific case, the best thing is to get the real
> > primitive function (via 'module-ref' for example) and compare it with
> > 'eq?' to the one you are worried about.
> > 
> > Like
> > 
> >     (define primitive-map (module-ref (resolve-module '(guile)) 'map))
> > 
> >     (if (eq? map primitive-map)
> >         ...)
> This would not work if the `map' in module (guile) was `set!' to a
> different value, would it?

Depends on the definition of "work"... If you want to test whether
your 'map' is the same as the 'map in the (guile) module, it would
work, if you would want to test whether your 'map' is a primitive
procedure, it wouldn't.  I think Thien-Thi wants the former, right?

reply via email to

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