Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data ApplyKey b a where
- F :: ApplyKey (a -> b)
- A :: ApplyKey a
- instance Reflex t => Apply (Event t) where
- evf <.> evx = fmapMaybe fromDMap e' where
- e' merge (DMap.fromList [F :=> evf, A :=> evx])
- fromDMap m = case (DMap.lookup F m, DMap.lookup A m) of
- (Just (Identity f), Just (Identity a)) -> Just (f a)
- _ -> Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement