09-01-2015, 01:11 PM

Function pascal(x) returns a level of Pascal's triangle.

Example:

pascal(7) returns {1,7,21,35,35,21,7,1}

the 7th level of Pascal's triangle

Example:

pascal(7) returns {1,7,21,35,35,21,7,1}

the 7th level of Pascal's triangle

Code:

`#pragma mode(separator(.,;) integer(h32))`

EXPORT pascal(x)

BEGIN

case

if x < 1 then {1};end;

if x < 2 then {1,1}; end;

default

concat(1,execon("&1+&2",pascal(x−1)),1);

end;

END;