
6 Feb
2012
6 Feb
'12
1:36 p.m.
On February 6, 2012 13:14:41 Bas van Dijk wrote:
But I agree that the API should accommodate for changing the amount of bits. What about the following API:
getStdGenState :: StdGen -> [Int32] getStdGenState (StdGen s1 s2) = [s1, s2]
stdGenFromState :: [Int32] -> Maybe StdGen stdGenFromState [s1, s2] = Just (StdGen s1 s2) stdGenFromState _ = Nothing
Jumping in without having paid much attention to the thread or API, but I expect [Word8] (ByteString?) would fit the general case better than [Int32] Cheers! -Tyson