accumulate ("*", []);
[];

accumulate ("*", [], 999);
[ 999 ];

accumulate ("+", [%pi]);
[ %pi ];

kill (foo);
done;

accumulate (foo, [%pi]);
[ %pi ];

accumulate (foo, [%pi], 1000);
[ 1000, foo (1000, %pi) ];

accumulate (foo, [%pi, %e, %phi, %gamma]);
[ %pi, foo (%pi, %e), foo (foo (%pi, %e), %phi), foo (foo (foo (%pi, %e), %phi), %gamma) ];

accumulate (foo, [%pi, %e, %phi, %gamma], 0);
[ 0, foo (0, %pi), foo (foo (0, %pi), %e), foo (foo (foo (0, %pi), %e), %phi), foo (foo (foo (foo (0, %pi), %e), %phi), %gamma) ];

accumulate (foo, [%pi, %e, %phi, %gamma], 1234);
[ 1234, foo (1234, %pi), foo (foo (1234, %pi), %e), foo (foo (foo (1234, %pi), %e), %phi), foo (foo (foo (foo (1234, %pi), %e), %phi), %gamma) ];

accumulate ("-", [%pi]);
[ %pi ];

accumulate ("-", [%pi], 1000);
[ 1000, 1000 - %pi ];

accumulate ("+", [%pi, %e, %phi, %gamma]);
[ %pi, %pi + %e, %pi + %e + %phi, %pi + %e + %phi + %gamma ];

accumulate ("+", [%pi, %e, %phi, %gamma], 0);
[ 0, %pi, %pi + %e, %pi + %e + %phi, %pi + %e + %phi + %gamma ];

accumulate ("+", [%pi, %e, %phi, %gamma], 1234);
[ 1234, 1234 + %pi, 1234 + %pi + %e, 1234 + %pi + %e + %phi, 1234 + %pi + %e + %phi + %gamma ];

accumulate ("*", [%pi, %e, %phi, %gamma]);
[ %pi, %pi * %e, %pi * %e * %phi, %pi * %e * %phi * %gamma ];

(%edispflag: true, 0);
0;

accumulate ("/", [%pi, %e, %phi, %gamma], 2);
[ 2, 2 / %pi, 2 / (%e * %pi), 2 / (%e * %phi * %pi), 2 / (%e * %gamma * %phi * %pi) ];

accumulate ("or", [ false, false, true, true, false, false ]);
[ false, false, true, true, true, true ];

accumulate ("and", [ true, true, true, false, false, true ]);
[ true, true, true, false, false, false ];

accumulate ("or", [ false, false, true, true, false, false ], false);
[ false, false, false, true, true, true, true ];

accumulate ("and", [ true, true, true, false, false, true ], true);
[ true, true, true, true, false, false, false ];

(reset (%edispflag), 0);
0;
