
7 Nov
2016
7 Nov
'16
7:56 p.m.
Hello! A short question, given: data Seed = ... data Value = ... someGenerator :: Seed -> [Value] createTwo :: Seed -> ([Value], [Value]) createTwo s = (as, bs) where as = someGenerator s bs = drop 1000000000 (someGenerator s) Is it guaranteed that 'someGenerator s' is created twice and not shared between 'as' and 'bs'? Is this by language design? Are there any GHC options that change the behaviour? Thank you, Michael