Smallest square that begins with n: Difference between revisions

Content added Content deleted
(Added Perl)
m (→‎{{header|Raku}}: self-ref: another alternative)
Line 225: Line 225:
my @haystack = (1..*) Z× (1..*);
my @haystack = (1..*) Z× (1..*);
# my @haystack = ( 1, 4, -> \a, \b { 2*b - a + 2 } ... * );
# my @haystack = ( 1, 4, -> \a, \b { 2*b - a + 2 } ... * );
# my @haystack = ( 1, { (++$)² } ... * );
for @needles -> \needle {
for @needles -> \needle {
for @haystack -> \hay {
for @haystack -> \hay {