I'd find it very useful to have a version of Gen.choose that works with int64 instead of int. I've had a quick look at the source code, and it looks like there already is a Gen.choose64 function. It's just not exposed due to the internal access modifier.
What's the reason for keeping it internal? Couldn't it be exposed?
One use case for me would be that it would allow me to work more easily with the ticks of a DateTimeOffset; something along the lines of
let dateTimeOffsetGenerator(min: DateTimeOffset, max: DateTimeOffset) =
gen {
let maxTicksToAdd = (max - min).Ticks
let! ticksToAdd = Gen.choose64(0, maxTicksToAdd)
return min.AddTicks(ticksToAdd)
}
I'd find it very useful to have a version of
Gen.choose
that works withint64
instead ofint
. I've had a quick look at the source code, and it looks like there already is aGen.choose64
function. It's just not exposed due to theinternal
access modifier.What's the reason for keeping it
internal
? Couldn't it be exposed?One use case for me would be that it would allow me to work more easily with the ticks of a
DateTimeOffset
; something along the lines of