[ library(apply_macros) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

sumlist(+Pred, +List, ?AccIn, ?AccOut)

Call Pred on all element of List and collect a result in Accumulator

Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

Examples

	sumlist(plus, [1,2,3,4], 1, 10).
	sumlist(times, [1,2,3,4], 1, 24).