Why does f: {} -> {} describe a function but g: {x} -> {} does not? The notation $|R^D| = |R|^{|D|}$ where $D$ and $R$ are finite sets is considered a mathematical pun. This can be written as functions that map from elements of $D$ to elements of $R$. I assume that it is related to the logic function "implies", which is the following:
0^0 = 1
0^1 = 0
1^0 = 1
1^1 = 1  
This must mean that $$f:\{\}->\{\}$$   is a function while $$g:\{x\}->\{\}$$ does not describe a function. I understand that something that maps to an empty set cannot describe a function, but I do not see the intuition of why an empty set being mapped to an empty set is a function.
 A: A function must map every element in the domain to one in the codomain. $\{x\}$ has an element so a function cannot map it into the empty set. But the requirement is vacuous for an empty domain, so you may have an empty function from the empty set to any codomain. 
A: Informally, a function is a thing which takes inputs and maps each to a well-defined output. It turns out that in fact it's convenient to allow a function to take no inputs at all; I'm sure you'll agree that a function which never takes any input (and therefore never outputs anything) takes every one of its inputs to a well-defined output, so this doesn't break anything else about what we understand by "function".
Formally, when we wish to implement functions in some underlying set theory such as the set theory ZF, we usually implement them as sets of ordered pairs $(a,b)$ such that no pair has the same first component as another. Then the empty set certainly fits: it's a set of no ordered pairs.
However, ultimately it's a question of conventions, and it turns out just to be a bit cleaner to allow the empty function, so it's universally accepted as convention that a function may be empty. For one thing, it lets us define the empty set as an initial object in the category of sets; for another, it lets us say that every set has an identity function on it (otherwise what would the identity function on $\emptyset$ be?).
