  We present the most precise measurement of the $z = 0$ HI mass function
(HIMF) to date based on the final catalogue of the ALFALFA (Arecibo Legacy Fast
ALFA) blind HI survey of the nearby Universe. The Schechter function fit has a
`knee' mass $\log (M_{*}\,h^{2}_{70}/\mathrm{M_{\odot}}) = 9.94 \pm 0.01 \pm
0.05$, a low-mass slope parameter $\alpha = -1.25 \pm 0.02 \pm 0.1$, and a
normalisation $\phi_{*} = (4.5 \pm 0.2 \pm 0.8) \times 10^{-3} \;
h^{3}_{70}\,\mathrm{Mpc^{-3}\,dex^{-1}}$, with both random and systematic
uncertainties as quoted. Together these give an estimate of the HI content of
the $z = 0$ Universe as $\Omega_{\mathrm{HI}} = (3.9 \pm 0.1 \pm 0.6) \times
10^{-4} \, h^{-1}_{70}$ (corrected for HI self-absorption). Our analysis of the
uncertainties indicates that the `knee' mass is a cosmologically fair
measurement of the $z = 0$ value, with its largest uncertainty originating from
the absolute flux calibration, but that the low-mass slope is only
representative of the local Universe. We also explore large scale trends in
$\alpha$ and $M_{*}$ across the ALFALFA volume. Unlike with the 40 per cent
sample, there is now sufficient coverage in both of the survey fields to make
an independent determination of the HIMF in each. We find a large discrepancy
in the low-mass slope ($\Delta \alpha = 0.14 \pm 0.03$) between the two
regions, and argue that this is likely caused by the presence of a deep void in
one field and the Virgo cluster in the other. Furthermore, we find that the
value of the `knee' mass within the Local Volume appears to be suppressed by
$0.18 \pm 0.04$ dex compared to the global ALFALFA value, which explains the
lower value measured by the shallower HIPASS. We discuss possible explanations
and interpretations of these results and how they can be expanded on with
future surveys.
