-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I realized it's possible to write
SeqT q >>= f = SeqT $ fmap {- a bunch of gunk -} qThis automatically takes care of making >>= entirely strict in its first argument for strict monad lawfulness as mentioned in #34. Is it a good thing or a bad thing otherwise? Clearly any rewrite rules might need to be adjusted to accommodate it.
One potentially nifty thing: (s >>= f) >>= g becomes, essentially, fmap (gunk g) (fmap (gunk f) s), making it subject to an fmap/fmap fusion law we could write for Queue.
Metadata
Metadata
Assignees
Labels
No labels