On 10/31/21 11:20, Sean McAfee wrote:
On Sun, Oct 31, 2021 at 9:08 AM Andinus via perl6-users <perl6-users@perl.org <mailto:perl6-users@perl.org>> wrote:

         put 2.sqrt.comb.grep(*.Int)>>.Int[^10].raku # 10 digits


comb takes an argument that can save you a method call:

     2.sqrt.comb.grep(*.Int)
   ==>
     2.sqrt.comb(/\d/)




> 2.sqrt.comb(/\d/)
(1 4 1 4 2 1 3 5 6 2 3 7 3 0 9 5 1)


> 2.sqrt.comb(/\d/)
(1 4 1 4 2 1 3 5 6 2 3 7 3 0 9 5 1)



:-)

Reply via email to