Bell numbers: Difference between revisions

Content added Content deleted
(→‎{{header|zkl}}: added code)
m (→‎{{header|REXX}}: added wording to the REXX section header.)
Line 211: Line 211:
This REXX version uses an   ''index''   of the Bell number   (which starts a zero).
This REXX version uses an   ''index''   of the Bell number   (which starts a zero).


A little optimization was added in calculating the factorial of a number.
A little optimization was added in calculating the factorial of a number by using memoization.
<lang rexx>/*REXX program calculates and displays a range of Bell numbers (index starts at zero).*/
<lang rexx>/*REXX program calculates and displays a range of Bell numbers (index starts at zero).*/
parse arg LO HI . /*obtain optional arguments from the CL*/
parse arg LO HI . /*obtain optional arguments from the CL*/