Pascal's triangle: Difference between revisions

m
(add E example)
Line 867:
combinations, choose.
Zero maps to the empty list. Negatives are inexpressible.
This solution uses a library routine for binomial coefficients.
<lang Ursala>#import std
#import nat
 
pascal = choose**ziDS+ iota*t+ iota+ successor</lang>
This solution uses direct summation.
<lang Ursala>
#import std
#import nat
 
pascal "n" = ~&tx (rep"n" ^C\~& sum*NhCixp) <<1>>
</lang>
test program:
<lang Ursala>#cast %nLL
Line 887 ⟶ 895:
<1,8,28,56,70,56,28,8,1>,
<1,9,36,84,126,126,84,36,9,1>></pre>
 
 
 
=={{header|Vedit macro language}}==
Anonymous user