
16 Mar
2005
16 Mar
'05
5:08 a.m.
On Wed, Mar 16, 2005 at 01:17:51AM +0100, Nicolas Oury wrote:
* linear implicit parameters
instance Splittable Int where split n = (2*n,2*n+1)
But I have a problem : the counter value increases exponentially. (I can only count up to 32 elements...)
Is there another way to split Int?
You could use unbounded Integers, or forget about numbers and use lists of bits. newtype BitString = BitString [Bool] instance Splittable BitString where split (BitString bs) = (BitString (False : bs), BitString (True : bs)) Best regards Tomasz