
13 Sep
2006
13 Sep
'06
9:24 p.m.
Magnus Jonsson wrote: [...]
but your example fails on infinite lists [...] take 2 $ snd $ head $ splitStreams (map (\x -> (0 ,x)) [1..])
Any approach, even sieving, will struggle with infinite lists, won't it? (take 2 . snd . head . splitStreams) [(i, i) | i <- [0..]] Regards, Tom

13 Sep
13 Sep
11:36 p.m.
On Thu, 14 Sep 2006 tpledger@ihug.co.nz wrote:
Any approach, even sieving, will struggle with infinite lists, won't it?
(take 2 . snd . head . splitStreams) [(i, i) | i <- [0..]]
Yes, if you expect two messages but only one comes then you'll wait forever, true.
Regards, Tom
6825
Age (days ago)
6825
Last active (days ago)
1 comments
2 participants
participants (2)
-
Magnus Jonsson
-
tpledger@ihug.co.nz