Source: Why I love Perl 6 | Damian Conway {blogs.perl.org}
stream
(seq-find
(lambda (x)
(and (= x (expt (cl-isqrt x) 2))
(>= (length (seq-uniq (number-to-string x))) 5)))
(stream-range 1))
cl-loop
(cl-loop for i from 1
when (and (= i (expt (cl-isqrt i) 2))
(>= (length (seq-uniq (number-to-string i))) 5))
return i)
while
(let ((i 1))
(catch 'good
(while t
(when (and (= i (expt (cl-isqrt i) 2))
(>= (length (seq-uniq (number-to-string i))) 5))
(throw 'good i))
(cl-incf i))))