This is a golfed-down version of the Fac() - Calculate Factorial of a natural number UDF.
The function basically multiplies the number n with the factorial of the previous number n-1 with the boundary condition of 1!=1
Code:

function fac($)
if $>1
$fac=cdbl($)*fac($-1)
else
$fac=1
endif
endfunction

_________________________
There are two types of vessels, submarines and targets.