http://qs321.pair.com?node_id=554407


in reply to Re^2: possible combinations in sequence
in thread possible combinations in sequence

Your use of grep is adorable! I think it's by far the most readable version, with the clearest exposition of intent.

The regexp on the other hand... the approach certainly is neat, i'll give you that ;) ++ for speed and ingenuity, but ouch does my head spin!