Internal`GetIteratorLength
Internal`GetIteratorLength[it]
returns the length (= number of iterations to be performed) of a standard iterator it
such as is used in Table
.
Internal`GetIteratorLength[{x, 3, 10}]
(* 8 *)
Internal`GetIteratorLength[{x, 3, 10, 0.27}]
(* 26 *)
Internal`GetIteratorLength[{x, {3, 4, 7}}]
(* 3 *)
Internal`GetIteratorLength[{4}]
(* 4 *)