chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Anaphoric IF


From: Bruce Hoult
Subject: Re: [Chicken-users] Anaphoric IF
Date: 25 Nov 2003 02:58:41 +1300

On Tue, 2003-11-25 at 02:50, Joerg F. Wittenberger wrote:
> William Annis <address@hidden> writes:
> 
> >  >(if* (member x y) (cadr it) ...)
> >  >
> >  >(if* (assq x y) (cdr it) #f)
> >  >
> >    <snip>
> >  >
> >  >Pointless or practical?
> > 
> >         I do this all the time.  
> 
> Yes, practical.  However:
> 
> I'd be even up for discussion, whether even srfi implementations
> should be included with the compiler, if the latter doesn't use them
> itself (I'd rather distribute kind of a library set, like the eggs
> collection, which is there anyway).  I feel that Scheme better not
> tries to become CL.  Please don't include it with the base
> distribution, make it available as yet another egg.
> 
> In any case, I'd rather like a different variant, similar to the
> handle-exceptions syntax, where you can name the variable.  (Due my
> lazyness, I'd prefer to remember only one, not two more predefined
> names.)
> 
> (if* it (member x y) (cadr it) ...)
> 
> 
> (if* foo (member x y) (cadr foo) ...)

Naming the variable has the advantage that you can implement it using
hygienic macros.

-- 
Bruce Hoult <address@hidden>





reply via email to

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