summaryrefslogtreecommitdiff
path: root/stdlib/math.pcdt
blob: 078045d11d00a3b8a504745938c15e2c83e6887f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
store(
  (
    store(0; last;)
    if(not(eq(arg0() 1;))
      (
        update(multiply(sub(arg0() 1;) arg1()) last;)
      )
    )
    sum(arg1() last())
  )
  multiply;
)