Is the set $\{\langle \varnothing, a \rangle ,\langle \{ \varnothing \}, b \rangle \}$ considered as function? The set defined as
$$F=\{\langle\varnothing,a \rangle, \langle \{\varnothing\},b\rangle\}$$
a function?
 A: Assuming you're using the "functions-as-sets-of-ordered-pairs" approach, then yes, it is: its domain is $\{\emptyset,\{\emptyset\}\}$, it sends $\emptyset$ to $a$, and it sends $\{\emptyset\}$ to $b$. Crucially $\emptyset\not=\{\emptyset\}$, so there's no inconsistency here.
(The other standard approach to functions views a function as a set of ordered pairs together with a specific mention of domain and codomain. Of course the domain is determined by the set of ordered pairs (at least, if we don't allow partial functions), but the codomain is not, so this is a genuinely different approach. If we take this stance then what you've written is not a function.)
EDIT: note that the parenthetical remark is exactly the point Arturo Magidin makes in his comment above.
A: Yes:  it is a function that maps $F: \{\emptyset, \{\emptyset\}\} \to \{a,b\}$.
As $\emptyset$ and $\{\emptyset\}$ are two distinct and different mathematical objects and each element of the domain, $\{\emptyset, \{\emptyset\}\}$, is mapped to precisely one element of the codomain, $\{a,b\}$ and not element of $\{\emptyset, \{\emptyset\}\}$ is mapped to more than one element of $\{a,b\}$, $F$ satisfies every definition of a function.
(Edit:  Noah and Artruro make the valid point that the the domain can be inferred to be $\{\emptyset, \{\emptyset\}\}$ but the codomain is unsepecified.  The codomain $\supset \{a,b\}$ and if your texts requires a codomain must be specified then this technically is not a function but that's fairly picky.  For must practical purposes I believe most would consider this a function.)
A: Yes, it is a function, and if you adopt the usual definition that $0 = \varnothing$, $1 = \{ \varnothing \}$, then this function maps from $\{ 0, 1 \}$ to real (or complex) numbers, and its explicit form is: $F(0) = a, F(1) = b$.
