I found all the solutions interesting (even those that let 'ab' slide through). For my own entry, I wanted to do it all in one regex and succeeded but the initial cost was nearly 90 characters. After a dinner and beer break I managed to simplify it out (I was using an extra grouping that wasn't needed), and was then able to use a bit of japhy's techniques to squeeze down to tie at 74:
sub is_fibo { pop=~/^(?{$x=$y=0})(?:(.)(??{"\Q$1"x$y})(?!\1)(?{$y=($x+=++$y)-$y})){3 +,}$/ }
Even passes 'strict' in 5.6.1, but not in 5.00503. Of course, there is the distinct possibility that my brain is mushier than I think from the beer and I'm missing some obvious failure mode with this one.
Update: Doh! And along comes japhy to casually make a putt I completely missed for a 2 stroke savings ... probably only used one hand too :-)
In reply to Re: (Golf) Fibonacci Strings
by danger
in thread (Golf) Fibonacci Strings
by danger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |