At the first step h0 is zero, so the summed inputs are just W_xh x = (1, 0, -1), with mean 0 and standard deviation 0.8165; the normalized vector is (1.2247, 0, -1.2247) and its tanh is the first row. At the second step W_hh feeds a shuffled copy of the first state into the summed inputs, which then get their own mean and standard deviation.
A layer-normalized recurrent layer re-centers and re-scales its summed inputs at every time step before the non-linearity, using statistics computed over the hidden units of that step only. Run one such layer over a whole sequence.
ln_rnn_forward(X, h0, W_xh, W_hh, g, b) -> np.ndarray
X: inputs, shape (T, D) (one row per time step; T may be 0).