WIP: BaseRecurrent and recurrent_apply_method

The scan related code is a typical boilerplate code
of which we had so much in Groundhog. This commit
introduces a way to get rid of it: a decorator that adds iteration
code to a single-step transition function.
You are right, thanks.

On 22.10.2014 19:33, Bart van Merriënboer wrote:
>
> In blocks/bricks.py:
>
> > +        inputs : list of strs
> > +            Names of transition function argument that
> > +            play input role.
> > +        states : list of str or (str, function) tuples.
> > +            Names of transition function arguments that
> > +            play state role. Additionaly a state initialization
> > +            function can be passed. The function should take
> > +            `self` and the batch sizes as arguments. By
> > +            default `BaseRecurrent.zero_state` is used.
> > +        num_outputs : int
> > +            Number of outputs of the transition function.
> > +        """
> > +
> > +        # Take care of default initialization.
> > +        for i in range(len(states)):
> > +            if isinstance(states[i], str):
>
> Should probably be |isinstance(states[i], basestring)|.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/bartvm/blocks/pull/10/files#r19229889>.
>