From: Rob Partington Date: 2004-07-14T22:42:20+09:00 Subject: Re: A little algorithmic help requested... On Sun, 11 Jul 2004 16:10:34 +0900, Hal Fulton wrote: > Example: > [1,2,3,4,6,7,8,11,12,15,16,17] ==> [1..4,6..8,11,12,15..17] > How would *you* do this? http://rjp.frottage.org/create_runs.txt (uses only bash, not ruby, doesn't do any sorting at all, copes with numbers from -1B to +1B) Probably not ideal for your ruby program, though.