Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sfoldl' :: (b -> a -> b) -> b -> Stream a -> b
- sfoldl' f acc (Stream next s0) = go acc s0
- where
- go acc s = acc `seq` case next s of
- Done -> acc
- Skip s' -> go acc s'
- Yield x s' -> go (f acc x) s'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement