Re: argmax
- From: Maciej Katafiasz <mathrick@xxxxxxxxx>
- Date: Thu, 28 Feb 2008 19:31:05 +0000 (UTC)
Den Thu, 28 Feb 2008 20:22:33 +0200 skrev Alex Mizrahi:
i suspect i'm not the only one doing such macro, but i'm not able to
find any of them, and don't even know how it could be called.. something
tells me that fancy LOOP substitutions like ITERATE have this built-in,
but it would be overkill to use ITERATE just for this thing. also, with
my macro CHECK is lexical function, so it can be used in fairly complex
cases -- passed to other functions etc.
Indeed, ITERATE has MAXIMIZING/MINIMIZING clauses just for that. I
wouldn't say that switching is an overkill -- I find ITERATE much more
readable (thanks to more lispy syntax), and in general, a bit more
predictable than LOOP. It's also extensible, so you could add a new
clause, say, OPTIMIZING expr BY, so that it'd work like all built-in
clauses.
Cheers,
Maciej
.
- References:
- argmax
- From: Alex Mizrahi
- argmax
- Prev by Date: Re: read string to float
- Next by Date: Re: System compilation failure, CLPPCRE, ASDF, SBCL involved
- Previous by thread: argmax
- Index(es):
Relevant Pages
|