Catalan numbers/Pascal's triangle: Difference between revisions

Content added Content deleted
Line 1,063: Line 1,063:
<lang Oforth>import: mapping
<lang Oforth>import: mapping


: pascal(n -- [] )
: pascal( n -- [] )
[ 1 ] #[ dup [ 0 ] + [ 0 ] rot + zipWith( #+ ) ] times(n) ;
[ 1 ] n #[ dup [ 0 ] + [ 0 ] rot + zipWith( #+ ) ] times ;


: catalan( n -- m )
: catalan( n -- m )