Monoid Comprehensions
A monoid comprehension takes the form:
where ? is a monoid and each qualifier ri is either:
Notes:
Our calculus is based on monoid comprehensions, which maps a number of input collection monoids into a monoid. A monoid comprehension takes the above form: it consists of an accumulator, which is the merge function of a monoid, that specifies how the results would be accumulated; the head specifies what to accumulate; a qualifier in the list of qualifiers is either a generator which specifies that variable v ranges over the collection type u or a filter pred to filter out values.