It seems like RNNCell, LSTMCell and GRUCell that are defined as mutable structs in src/layers/recurrent.jl never actually use any mutation in the forward pass. Instead, it looks like state mutation is handled in the Recur struct, which copies over the hidden state of its cell during construction and then never reads or writes the cell's hidden state onwards.
Given this, what is the reason these recurrent cells are defined as mutable structs?
Should we change them to be immutable to reap the performance benefits that come with this?