  We generalize the extrapolation theory of Rubio de Francia to the context of
Banach function spaces and modular spaces. Our results are formulated in terms
of some natural weighted estimates for the Hardy-Littlewood maximal function
and are stated in measure spaces and for general Muckenhoupt bases. Finally, we
give several applications in analysis and partial differential equations.
