Implementation of zipfian generator.