Catalan numbers: Difference between revisions
Content added Content deleted
(→{{header|Julia}}: shorten) |
(Added Wortel) |
||
Line 2,802: | Line 2,802: | ||
</pre> |
</pre> |
||
(Expect same result with "Catalan2 15") |
(Expect same result with "Catalan2 15") |
||
=={{header|Wortel}}== |
|||
<lang wortel>; the following number expression calculcates the nth Catalan number |
|||
#~ddiFSFmSoFSn |
|||
; which stands for: dup dup inc fac swap fac mult swap double fac swap divide |
|||
; to get the first 15 Catalan numbers we map this function over a list from 0 to 15 |
|||
!*#~ddiFSFmSoFSn @til 15 |
|||
; returns [1 1 2 5 14 42 132 429 1430 4862 16796 58786 208012 742900 2674439.9999999995]</lang> |
|||
=={{header|XPL0}}== |
=={{header|XPL0}}== |