factor observe_
This commit is contained in:
parent
5cd44282a9
commit
fc80b8d96b
3 changed files with 10 additions and 13 deletions
|
@ -36,3 +36,7 @@ observe observer a = do
|
|||
r <- a
|
||||
_ <- observer r
|
||||
return r
|
||||
|
||||
{- Like observe, but the observer is not passed the value. -}
|
||||
observe_ :: (Monad m) => m b -> m a -> m a
|
||||
observe_ observer = observe (const observer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue