The HI galaxy mass function represents a fundamental component of our understanding of the gas content of galaxies. How its form varies throughout the local Universe and as a function of redshift is key to developing a complete picture of galaxy evolution. We use the ALFALFA 70% catalogue, the largest uniform catalogue of extragalactic HI sources to date, to explore the environmental dependence of the HI mass function based on the projected neighbour densities in both SDSS and 2MRS. The Schechter function 'knee' mass is found to increase by approximately 0.2 dex from the lowest to highest neighbour density quartiles. However, this dependence is seen only when environment is defined by SDSS neighbours, and not with 2MRS. We interpret this as an indication of local, rather than large scale, environmental dependence. In addition, we find no evidence for any change in the faint-end slope; which is a source of tension with HI surveys of galaxy groups. As HI surveys push deeper in an attempt to assess the HI content of the Universe towards a redshift of order unity, only the integral of the HI mass function will be measurable, and even that, only by spectral line stacking. We present an analytic, and thus computationally cheap, method to estimate the contribution of HI confusion noise to these stacks and explore the implications for upcoming SKA-precursor surveys.