A free monad for creating DOM elements