-- | Create a function, useful for registering actions
event :: String -> Action () -> Action ()
event name act = do
    (xs, _) <- capture act
    emit $ Function (Fun name) xs
event :: String -> Action () -> Action ()
event name act = do
    (xs, _) <- capture act
    emit $ Function (Fun name) xs
event name act = do
    (xs, _) <- capture act
    emit $ Function (Fun name) xs