From: Gary Wright Date: 2007-04-03T17:24:38+09:00 Subject: Re: Last iteration condition On Apr 3, 2007, at 3:50 AM, Brian Candler wrote: > On Tue, Apr 03, 2007 at 03:31:09PM +0900, Gary Wright wrote: >> Building off of Brian's suggestion in that thread, here >> is a way to provide a 'countdown' as the end of the iteration >> approaches. Default is to only flag the last item but you >> can ask for any number of items to be flagged. > > Interesting. Maybe it would be cleaner to return nil for all non- > countdown > items, and then n-1, n-2 ... 0 as the flag (or n, n-1 ... 1). e.g. I liked the idea of the flag being true for all but the last item. It just makes boolean expressions nicer for that special case even when you are counting down.