Is there a set theory where functions are primitives? It doesn't really sit right with me that functions between sets should themselves be defined as sets.  Is there some set theory that treats both sets and functions equally as basic notions instead of defining one in terms of the other?
 A: Lawvere's "Elementary Theory of the Category of Sets" (ETCS) is probably what you're looking for. Here are some links:
https://golem.ph.utexas.edu/category/2014/01/an_elementary_theory_of_the_ca.html
https://ncatlab.org/nlab/show/ETCS
and the original article: http://www.tac.mta.ca/tac/reprints/articles/11/tr11.pdf
It might be tricky if you haven't seen category theory yet, though.
A: Von Neumann set theory. From the Wikipedia page:

In two articles published in 1925 and 1928, John von Neumann stated his axioms and showed they were adequate to develop set theory. Von Neumann took functions and arguments as primitives. His functions correspond to classes, and functions that can be used as arguments correspond to sets. In fact, he defined classes and sets using functions that can take only two values (that is, indicator functions whose domain is the class of all arguments).
von Neumann, John (1925), "Eine Axiomatisierung der Mengenlehre", Journal für die Reine und Angewandte Mathematik, 154: 219–240. English translation: van Heijenoort, Jean (1967), "An axiomatization of set theory", From Frege to Gödel: A Source Book in Mathematical Logic, 1879-1931, Harvard University Press, pp. 393–413.
von Neumann, John (1928), "Die Axiomatisierung der Mengenlehre", Mathematische Zeitschrift, 27: 669–752, doi:10.1007/bf0117112

