#J, score is 7 (12 chars - 5 points for avoiding multiplication)
J, score is 7 (12 chars - 5 points for avoiding multiplication)
+/@$/@$~/@$~
usage:
4 +/@$/@$~/@$~ 3 1.34078e154 t=.+/@$/@$~/@$~ NB. define a function 4 t 3 1.34078e154 2 t 2 4 Just few nested folds:
- Using multiplication it would be
*/@$~/@$~ - Using power it would be
^/@$~where$~creates array,/is a fold function.