Codegolf: Triangle
https://codegolf.stackexchange.com/questions/129458/lets-make-a-triangle
by 2ndAttmt
JavaScript
p=(n,r,c=0)=>n?(o=>{while(n&&r<n)c+=p(--n,r);while(o*r)c+=p(--o,--r)})(n)||c:1
alert(p(0, 0)) // 1
alert(p(1, 0)) // 1
alert(p(2, 0)) // 2
alert(p(4, 2)) // 14
alert(p(6, 3)) // 106
alert(p(7, 7)) // 64