method foo {
for 1 .. 10 {
$^.method(.sqrt);
}
}
I would make that:
method foo
{
for 1 .. 10
{
.method sqrt: # $?SELF.method( $_.sqrt() )
}
}Then usage is:
my $x = "blubb";
$x.foo; # $x.method( sqrt(1) ) .. $x.method( sqrt(10) )
Iff "blubb" has got a method .method that takes a Num as param ;) -- TSa (Thomas Sandla�)
