This question already has an answer here:

I am computing a long Table[], but the computation of the last few elements is taking too long, and I am afraid I will never converge. I would like to access the part of the Table which has been already computed and then abort the evaluation. Is that possible and how? Thanks.


marked as duplicate by bbgodfrey, Dr. belisarius, Karsten 7., m_goldberg, chuy Mar 25 '15 at 18:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Perhaps you can adapt something like this

partial = Reap[CheckAbort[full=Table[Sow[expr]; expr, {i,1,1000}], Null]][[2,1]]
  • $\begingroup$ You could also use TimeConstrained instead of CheckAbort. $\endgroup$ – 2012rcampion Mar 25 '15 at 17:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.