initialize hidden state for each time step in the sequence: read current input combine it with previous hidden state update hidden state optionally produce output return final output or all outputs