Catalan numbers: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: simplified two subroutines -- ~~~~)
Line 881: Line 881:
for i from 1 to 3 do
for i from 1 to 3 do
(format t "~%Method ~d:~%" i)
(format t "~%Method ~d:~%" i)
(dotimes (i 16) (format t "C(~2d) = ~d~%" i (catalan2 i))))</lang>
(dotimes (i 16) (format t "C(~2d) = ~d~%" i (funcall f i))))</lang>

=={{header|D}}==
=={{header|D}}==
<lang d>import std.stdio, std.bigint, std.functional;
<lang d>import std.stdio, std.bigint, std.functional;