
25 Jul
2011
25 Jul
'11
12:50 a.m.
On 25 July 2011 14:31, Mark Spezzano
Hi Kevin,
Thanks for the response. The first part works well with minor modifications.
Part 2 is still a bit vague to me. I basically want to "clamp" the Integers generated within the Queue to between 0 and some positive number. At present they're giving me numbers all over the place (specifically negative number)
QuickCheck has a NonNegative newtype wrapper you can use for the >=0 criteria; to specify the maximum, use the resize function (the instance for Int, etc. use the current size parameter as the maximum value). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com