Coupon Collector implementation in Scala