Perl6
sub factorial ($n) { [*] 1..$n }
I hardly know about Perl6. But I guess this [*]
operator is same as Haskell's product
.
This code runs on Pugs, and maybe Parrot (I didn't check it.)
Edit
This code also works.
sub postfix: ($n) { [*] 1..$n }
# This function(?) call like below ... It looks like mathematical notation.
say 10!;