In Halmos' Naive Set Theory (towards the end of the "Arithmetic" chapter) he mentions the titular claim:
For all finite sets $A$ and $B$, $\{ f:B\to A \}$ is finite and its (finite) cardinal is $|A|^{|B|}$ where $|A|$ and $|B|$ are the (finite) cardinals of $A$ and $B$, respectively.
Halmos does not provide a hint for this proof. Can the Math StackExchange community provide a hint?
*Let it be known that I intuitively accept the claim, but the proof I find difficult. The proof boils down to constructing a bijection between $\{f:B\to A\}$ and $\{n\in\mathbb{N}:n<|A|^{|B|}\}$. I have a feeling it will require a proof by induction.