Factor creation of feedforward mapping into a helper function, and use that in recurrent networks.