use Perl6::Currying;
use Perl6::Placeholders;

# tail recursive factorial:
sub f($n,$a) { if ($n<2) {$a} else {f($n-1,$a*$n)} }

my $factorial = &f.prebind(a=>1);

print $factorial->(6), "\n";


# ---------

my $I = {$^b - $^a};   # sorted alphabetically!

print $I->(8,2), "\n";

