"A set-theorist is a person for whom all functions are unary". This quote is from Keith Devlin's book The Joy of Sets. I'm not sure I quite understand what he is trying to say. Could someone please put some light on what this could mean.
 A: A unary function is one which only takes one input, as opposed to a function that takes in multiple inputs. 
In set theory, a fuction $f:X\to Y$ is a subset of $X\times Y$ such that for each $x\in X$ there exists unique $y\in Y$ such that $(x,y)\in f$. Thus, it seems that every function is unary; the general function $f$, here, only takes in one input, namely, an element of $X$. 
Given some set $X$, a multivariable function would be, for example, a function $g:X\times X\to Y$. One way to think about $g$ is that it is a function taking in two elements of $X$ and outputting an element of $Y$; another way is that $g$ takes in one input (an element of $X\times X$, i.e. an ordered pair of elements of $X$, which can be thought of as a single object). The joke, presumably, is that set theorists are more inclined to take the latter view. 
A: The following is my interpretation of this sentence, which is Exercise 1.6.1 of Devlin's book.
First, note that at this point of the book a function $f\colon x\rightarrow y$ has not yet been defined, which means that an $n$-ary function must be interpreted after the definition which was given just before the Exercise, that is:
Definition: an $n$-ary function on a set $x$ is an $(n+1)$-ary relation $R$ on $x$ (i.e., $R\subseteq x^{n+1}$) such that $\forall \alpha\in \text{dom}(R)\,\exists!b\in\text{ran}(R)|(\alpha,b)\in R$.
What I want to stress, here, is that there is only one set $x$ involved in this definition: there is no "$y$".
This means that $R\subseteq x^{n+1},\text{dom}(R)\subseteq x^n $ and $\text{ran}(R)\subseteq x$: put in "naive" language, a "function" after this definition is just a "standard function" $R\colon x^n\rightarrow x$.
We want to turn this into a unary function on some set $z$, that is we must look for a set $z$ and a unary function $Q$ on $z$ which essentially encodes exactly the same information that $R$ does.
Now, after the definition a unary function on $z$ is a binary relation $Q$ on $z$ (i.e., $Q\subseteq z\times z$) such that
$\forall a\in \text{dom}(Q)\,\exists!b\in\text{ran}(Q)|(a,b)\in Q$.
Thus, $Q\subseteq z,\text{dom}(Q)\subseteq z $ and $\text{ran}(Q)\subseteq z$ which, in "naive language", is a standard function $Q\colon z\rightarrow z$. Please note that domain and codomain coincide.
In conclusion, we must turn a function $R\colon x^n\rightarrow x$ into a function $Q\colon z\rightarrow z$ for a suitable set $z$ in such a way that they both give exactly the same information.
The trick is to use the diagonal in $x^n$: let $d=\{\alpha\in x^n|\alpha=(a,\ldots,a)\text{ for some }a\in x\}$ and let $i\colon x\rightarrow d\  (i\colon a\mapsto \alpha=(a,\ldots,a))$ the obvious map; moreover, if $\alpha\in x^n$ let us denote by $R(\alpha)\in x$ its image, i.e. the unique $b\in x$ such that $(\alpha,b)\in R$.
We are now ready to define $Q$: let $Q=\big\{\big(\alpha,i(R(\alpha))\big)\,\big|\,\alpha\in x^n\big\}$. In "naive language",
$$
Q((a_1,\ldots,a_n))=\big(R(a_1,\ldots,a_n),\ldots,R(a_1,\ldots,a_n)\big).
$$
We have $Q\subseteq x^n\times x^n$, so $Q$ is a binary relation on $x^n$ and, by definition, $\forall \alpha\in x^n\exists!\beta\in x^n$ such that $(\alpha,\beta)\in Q$: namely, $\beta=i(R(\alpha))$ and it is unique, given that both $R$ and $i$ are functions.
Finally, if $()_i^n$ for $i=0,\ldots,n-1$ are the projections (defined in Devlin's book in Section 1.4), then it is easy to show that
$$
(\alpha,\beta)\in Q \quad\leftrightarrow\quad R(\alpha)=(\beta)^n_0=\dots=(\beta)^n_{n-1}
$$
so that each one of $R$ and $Q$ uniquely defines the other.
In this way, we have shown that the notion of unary function is enough to define $n$-ary functions for $n>1$, so there would be no need to define the latters (but it would be quite cumbersome not to do so...)
