in reply to Golf (Inspired): Repeated Phrases
From both a programming and a spec problem I like only looking for phrases of a given size (which was what was done in the story). From that you can derive your solution through:
An incidental note. The mathematician in me reads your phrase "a list of" and wants to offer the following cheat as a "solution":sub p{ ($m,$n,@_)=@_;map{f($_,@_)}$m..$n }
(It is a list, and everything in it is a phrase of the right size that appears in both lists!)sub p{()}
UPDATE
And, of course, I can show that all golf can be improved with the utterly ridiculous:
sub p{}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re (tilly) 1: Golf (Inspired): Repeated Phrases
by Masem (Monsignor) on May 10, 2001 at 17:56 UTC |