(examples-for accum
("accumulate the values passed to a given function and return the list" (accum a (a 1) (a 2) (a 3)) (1 2 3)) ("accum function returns the accumulated object in each case" (let watcher nil (let accumulated (accum b (= watcher (cons (b 1) watcher)) (= watcher (cons (b 2) watcher)) (= watcher (cons (b 3) watcher))) (list 'watcher watcher 'accumulated accumulated))) (watcher (3 2 1) accumulated (1 2 3))))
(examples-for accum-hash
("accumulate the values passed to a given function under the given key, return the resulting hash" (let h (accum-hash hi (hi 'a 1) (hi 'a 2) (hi 'b 42) (hi 'b 43) (hi 'a 3) (hi 'b 44) (hi 'c 'x) (hi 'a 4) (hi 'c 'y) (hi 'c 'z)) (list h.a h.b h.c)) ((4 3 2 1) (44 43 42) (z y x))))