@@ -2607,11 +2607,10 @@ smapM step initial stream =
2607 -- (\(s, _) a -> step s a)
2607 -- (\(s, _) a -> step s a)
2608 -- (fmap (,undefined) initial)
2608 -- (fmap (,undefined) initial)
2609 -- stream
2609 -- stream
2610− let r = concatMap
2610+ let r = postscanlM'
2611− (\s0 ->
2611+ (\(s, _) a -> step s a)
2612− postscanlM' (\(s, _) a -> step s a) (return (s0, undefined)) stream
2612+ (fmap (,undefined) initial)
2615 in Serial.map snd r
2614 in Serial.map snd r
2617------------------------------------------------------------------------------
2616------------------------------------------------------------------------------