onceRef :: UI (Ref (Maybe a),E a, H UI a)
onceRef = do
  r <- newRef Nothing
  (e,h) <- newEvent
  avail <- stepper True $ False <$ e
  onEvent (whenE avail e) $ \a -> do
    writeRef r $ Just a
    h a
  return (r,e,h)

-- }}}

-- Class Modifiers {{{
onceRef :: UI (Ref (Maybe a),E a, H UI a)
onceRef = do
  r <- newRef Nothing
  (e,h) <- newEvent
  avail <- stepper True $ False <$ e
  onEvent (whenE avail e) $ \a -> do
    writeRef r $ Just a
    h a
  return (r,e,h)

-- }}}

-- Class Modifiers {{{
onceRef = do
  r <- newRef Nothing
  (e,h) <- newEvent
  avail <- stepper True $ False <$ e
  onEvent (whenE avail e) $ \a -> do
    writeRef r $ Just a
    h a
  return (r,e,h)

-- }}}

-- Class Modifiers {{{