RosettaCodeData/Task/Factorial/PostScript/factorial-2.ps

7 lines
190 B
PostScript

/fact {
1 % initial value for the product
1 1 % for's start value and increment
4 -1 roll % bring the argument to the top as for's end value
{ mul } for
} def