Last active
July 6, 2017 18:25
-
-
Save 3noch/0c7dc1a4d9412430f405b66533c7ea45 to your computer and use it in GitHub Desktop.
Reflex Function: latestLeft
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
latestLeft :: (Reflex t, MonadHold t m) => a -> Event t (Either a b) -> m (Dynamic t a) | |
latestLeft initial x = holdDyn initial $ fmapMaybe (either Just (const Nothing)) x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment