New answers tagged

2

This probably won't be very satisfying but you can use the anonymous function syntax and call the function with the call function: f := <x : 2 x> call(f, 7) => 14 (Sadly f(7) doesn't work.)


3

Another solution, if you know from the beginning that you want a sum, is use a vector. Prefix your list of numbers with [, finish with ], and sum using calc-reduce with the + operator (v R +): [ 1 2 ... ] v R +


3

Summing the whole stack of calc can be achieved using a keyboard macro. Define the macro (which does just the + operation): C-x ( + C-x ). BTW this definition already sums two elements of the stack as a side effect. Then run the macro until an error occurs with C-0 X. That's it! The error is expected to occur when one element remains on the stack. If ...


Top 50 recent answers are included