[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: list building
From: |
Matt Hellige |
Subject: |
Re: list building |
Date: |
Wed, 14 Jan 2004 13:39:44 -0600 |
User-agent: |
Mutt/1.2.5i |
[Lynn Winebarger <address@hidden>]
>
> Better to take TTN's advice if there's any portability desired.
> Order of evaluation is not specified by the scheme standard.
>
I think that's a bit of an overstatement. The other suggestions are
perfectly portable, and people write code like that all the time. It's
true that evaluation order is unspecified, but it often doesn't matter
(otherwise I think we'd see a lot more hand-crafted CPS in Scheme
programs).
In particular, it isn't at all clear to me whether it matters in this
case. Imperative code often over-specifies... However, you're right
that the issue certainly merits mention, and on that point I stand
corrected...
Matt
>
> Stephen Compall wrote:
> > Matt Hellige <address@hidden> writes:
> >
> >
> >>If you already have an output-list you need to preserve, then:
> >>
> >> (set! output-list
> >> `(,(sgids pref-login)
> >> ,(gids)
> >> ,(getd pref-login)
> >> . ,output-list))
> >
> >
> > Better,
> >
> > (set! output-list (cons* (getd pref-login) (gids) (sgids pref-login)
> > output-list))
> >
> > Particularly as the original pushed `sgids' first, IIRC. cons* is your
> > friend.
> >
>
>
>
> _______________________________________________
> Guile-user mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/guile-user
--
Matt Hellige address@hidden
http://matt.immute.net
- Re: list building, (continued)
Re: list building, Marius Vollmer, 2004/01/14
Re: list building, Matt Hellige, 2004/01/14
Re: list building, Keith Wright, 2004/01/15