ToddAndMargo via perl6-users @ 2021-10-30 23:57 -07: > Without going into why (it is a secret), how do I turn > >> my $x = sqrt 2 > 1.4142135623730951 > > into an array of integers? > @y[0] = 1 > @y[1] = 4 > @y[2] = 1 > @y[3] = 4 > @y[4] = 2 > @y[5] = 1
put 2.sqrt.comb.grep(*.Int)>>.Int[^10].raku # 10 digits (1, 4, 1, 4, 2, 1, 3, 5, 6, 2)
signature.asc
Description: PGP signature