Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sfoldl' :: (b -> a -> b) -> b -> Stream a -> b
  2. sfoldl' f acc (Stream next s0) = go acc s0
  3.     where
  4.         go acc s = acc `seq` case next s of
  5.             Done -> acc
  6.             Skip s' -> go acc s'
  7.             Yield x s' -> go (f acc x) s'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement