Closed gpampara closed 6 years ago
What would the correct behaviour be? Request n
values and then you get back m
instead is wrong.
Was just wondering if n
is greater than the list size should duplicates then be allowed. But that behavior is better off with something like
RVar.choose(NonEmptyList(...)).replicateM(n)
Yeah, I would be very hesitant to overload the behaviour like that. It seems very out of the functions scope.
The function was returning invalid results due to referencing the wrong data structure. Some additional logic is now also included to make sure that the operation behaves a little more efficiently.
MetricSpace
did not use the memoization scheme correctly, resulting in no benefit actually being present. This is now correct, referencing the memoization map structure.