From: Gary Wright Date: 2009-06-12T21:41:30+09:00 Subject: Re: Idiomatic way to detect first/last iteration? On Jun 12, 2009, at 7:45 AM, paron wrote: > first_record=records.shift > last_record=records.pop You can't use 'shift' and 'pop' if you want the solution to work with *any* enumerable object. It just depends how general a solution you are looking for.