Documentation for method assuming

Documentation for method assuming, assembled from the following types:

role Callable

From Callable

(Callable) method assuming

method assuming(Callable:D $self: |primers)

Returns a Callable that implements the same behaviour as the original, but has the values passed to .assuming already bound to the corresponding parameters.

my sub slow($n){ my $i = 0$i++ while $i < $n$i };
 
# takes only one parameter and as such wont forward $n 
sub bench(&c){ cnow - ENTER now };
 
say &slow.assuming(10000000).&bench# OUTPUT: «(10000000 7.5508834)␤»