LSTM loop output of previous timestep as input

Is there any way to loop back output of an LSTM back into itself for a fixed number of timesteps? One way can be using for loop but I think it will be significantly slower.
In short an alternative of this.

        for i in range(k): 
            a0, (h0, c0) = lstm(h0, a0)

@ptrblck

As far as I am aware, there is no faster way to accomplish this task.

Thank you for your reply!
I was wondering if I give the LSTM the same input k times (sequence length k instead of 1) instead of unrolling the timesteps using for loop, will it produce the same outputs as before?
For eg.
a0 = [h0, h0, h0, ..., h0] #k times
out, _ = lstm (h0, a0)
Will the out be same as appended a0 from the original for loop implementation?