Created
August 21, 2019 06:04
-
-
Save jfischoff/3125908955980d24d8936fbb71662bbd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delayOne :: (MonadHold t m, Reflex t) => Event t a -> m (Event t (a, a)) | |
delayOne e = do | |
b <- hold Nothing $ Just <$> e | |
let eOld = W.catMaybes $ b <@ e | |
pure $ liftF2 (,) eOld e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment