Open andrewdolce opened 7 years ago
I say we go ahead and do it.
This interface ip_random(0..<10) seems very C-style and not swift-3 like.
Take:
dispatch_async(dispatch_get_main_queue(), ...)
vs
DispatchQueue.main.async( ... )
or any one of the map/reduce operators that have now gone on to be implemented in the collection extensions as opposed to being implemented as global functions. Happy to stand corrected on this though!
From a TODO in UnsignedInteger+Extensions: There is a public function
random
that takes in aCountableClosedRange
of integers and returns a random int from within the range. The TODO comment suggests that this function could live as a member function onCountableClosedRange
. So it would look something like:I think to address this issue we need to:
Not necessarily in that order. I think taking a stab at (2) could help inform (1).