Replicate r←x⌿y

x is a vector of naturals with length equal to the tally of y. r is an array containing major cells y in the multiplicity indicated by the corresponding element of x. This means that cells that correspond to a 0 don't appear in r, cells that correspond to a 1 appear once, cells that correspond to a 2 appear twice, et cetera.

x is a dictionary with boolean values, y is a dictionary. r is the dictionary with keys that appear in x and correspond to true values, and values on matching keys in y.