1 2 3 4 5 6 7 8 9 10 11 12
store( ref(( store(0; last;) if(not(eq(arg0() 1;)) ( update(multiply(sub(arg0() 1;) arg1()) last;) ) ) sum(arg1() last()) )) multiply; )