From: Robert Dober Date: 2008-07-20T23:31:23+09:00 Subject: Re: The next number that is not in an array On Sat, Jul 19, 2008 at 8:36 PM, David A. Black wrote: > irb(main):020:0> a = [2,3,4,8,12,13,15] > => [2, 3, 4, 8, 12, 13, 15] > irb(main):021:0> ([*a[0]..20] - a).shift > => 5 > > It's a cool idea, though I would find it somewhat hard to see what's > going on at a glance than some of the others. I am somehow surprised, maybe you should look at Erik's enhancement of my first functional proposed solution to see where the problems with this solution are. HTH Robert