You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with Conduit for the past few days and I'm looking for something like a 'delay'. For reference, I've had a pleasant experience using RxJS and one of the provided operators is delay. I find it interesting that Conduit doesn't provide something like that out-of-the-box.
I implemented this kind of feature using the following:
delay::MonadIOm=>Int->ConduitTaam()
delay n = awaitForever $\v ->do
liftIO $ threadDelay n
yield v
It looks very simple so I assume that something is wrong or I'm not considering some edge case. So far it has worked great, but I would like to know if this implementation is correct and if anyone is interested in adding it to the Combinators module.
The text was updated successfully, but these errors were encountered:
The implementation looks fine to me. This function doesn’t exist because no one’s ever expressed a need for it. I don’t see a problem with adding it if you’re interested in making a PR
I've been playing around with Conduit for the past few days and I'm looking for something like a 'delay'. For reference, I've had a pleasant experience using RxJS and one of the provided operators is delay. I find it interesting that Conduit doesn't provide something like that out-of-the-box.
I implemented this kind of feature using the following:
It looks very simple so I assume that something is wrong or I'm not considering some edge case. So far it has worked great, but I would like to know if this implementation is correct and if anyone is interested in adding it to the Combinators module.
The text was updated successfully, but these errors were encountered: