polyap: Polya sampling from an urn

Description

Consider an urn containing a finite set of values.
An item is selected at random from the urn. Then it is returned
to the urn along with another item with the same value. Next
a value is selected at random from the reconstituted urn
and it and a copy our returned to the urn. This process is
repeated until k additional items have been added to the
original urn. The original composition of the urn along with the selected
values, in order, are returned.