The function of the epididymis in mammals is the storage of sperms. The epididymis is a long, coiled tube that sits on the surface of the testis. It is where the sperm produced in the testis is stored and matured until it is ready to be ejaculated during sexual intercourse. The epididymis provides a suitable environment for the sperms to mature, gain motility and fertilizing ability. It also helps to transport the sperm from the testis to the vas deferens, which is the tube that carries the sperm out of the body. In summary, the epididymis plays a crucial role in the reproduction of mammals by storing and maturing sperm until they are ready for ejaculation.