  The Arecibo Legacy Fast ALFA (ALFALFA) survey has completed source extraction
for 40% of its total sky area, resulting in the largest sample of HI-selected
galaxies to date. We measure the HI mass function from a sample of 10,119
galaxies with 6.2 < log (M_HI/M_Sun) < 11.0 and with well-described mass errors
that accurately reflect our knowledge of low-mass systems. We characterize the
survey sensitivity and its dependence on profile velocity width, the effect of
large-scale structure, and the impact of radio frequency interference in order
to calculate the HIMF with both the 1/Vmax and 2DSWML methods. We also assess a
flux-limited sample to test the robustness of the methods applied to the full
sample. These measurements are in excellent agreement with one another; the
derived Schechter function parameters are phi* = 4.8 (+/- 0.3) * 10^-3, log
(M*/M_Sun) + 2 log(h_70) = 9.96 (+/- 0.2), and alpha = -1.33 (+/- 0.02). We
find Omega_HI = 4.3 (+/- 0.3) * 10^-4, 16% larger than the 2005 HIPASS result,
and our Schechter function fit extrapolated to log (M_HI/M_Sun) = 11.0 predicts
an order of magnitude more galaxies than HIPASS. The larger values of Omega_HI
and of M* imply an upward adjustment for estimates of the detection rate of
future large-scale HI line surveys with, e.g., the Square Kilometer Array. A
comparison with simulated galaxies from the Millennium Run and a treatment of
photoheating as a method of baryon removal from HI-selected halos indicates
that the disagreement between dark matter mass functions and baryonic mass
functions may soon be resolved.
