May 2019 Archives

Why I love Raku

and this week's first task was:

Write a script that finds the first square number that has at least 5 distinct digits.

The solution to that is (obviously!) to lazily square every number from 1 to infinity, then comb through each square's digits looking for five or more unique numerals, and immediately output the first such square you find.

Which translates directly to Raku:


About Damian Conway