chickadee » srfi-113 » bag-product

bag-product n bagprocedure
bag-product! n bagprocedure

The bag-product procedure returns a newly allocated bag containing all the unique elements in bag, where the count of each unique element in the bag is equal to the count of that element in bag multiplied by n.

The bag-product! procedure is equivalent except that it is linear-update.