Exactly how to generalise RPN calculation style into a programming language is a question that has fascinated me recently. I am pleased to report that there now exists a programming language that is a natural extension of RPN — Ambi.
A factorial operator may now be defined in Ambi. A new version has been posted today.
// Factorial Function;
function; ! ;
seq ; import $n = ;
ifelse;
$n 1 eq;
1 export;
$n 1 – ! $n * export;
// Use the function ;
5 ! .
Check it out!