I haven't tried it, but just eyeballing it, the method "looks wrong." You have multiple return statements from a single "for" loop. Your for loop has no proper initialisation, only "head". The double updating might be permissible syntax (and you can find it in the books) but it is confusing to read. In fact this looks quite inappropriate for a "for" loop. And you should never have "==true" after "if."
Post by:autobot
"To do good, you actually have to do something." -- Yvon Chouinard
a bit of art, as a gift, that will fit in a stocking