Guest User

Untitled

a guest
Apr 1st, 2022
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. maps :: (Functor f, Monad m) =>
  2. (forall x. f x -> g x) -> Stream f m r -> Stream g m r
  3.  
  4. Note the first argument: this function replaces the functor but leaves the value inside
  5. it unchanged. Why? Because it’s under forall, we can’t do anything with it other than
  6. pass it around. Thus, we are guaranteed that the stream structure remains
  7. unchanged.
Advertisement
Add Comment
Please, Sign In to add comment