1. There is no information about different argument constratins (iteratior, init, body). Actually, some information could be deduced using pseudocode, but it looks like it would be better to describe it in words. That's because 'init' and 'iterator' accepts 'A' params (by pseudocode), but I assume they could have different, but 'effectively equivalent' params (removing parameter from example's newArrayList changes nothing). Anyway, list of questions not covered in 'words' could be found below:
Constraints for 'init' argument list:
-- Should argument list be the same for 'init' and 'iterator' (or be 'effectively equals')?
-- Which parameter list we should expect as a result of loop creation? Should it be the same as 'init' parameters list or not? What kind of parameter list should we expect in cases:
---- 'init'=null
---- 'iterator'=null
---- 'init'=null && 'iterator'=null?
It looks like JDK-8150964.
-- 'body' return type could be deduced using pseudocode, but it would be good to specify it in doc as long as other functions types.
2. 'Implementation requirements' code will fail with NPE for iterator=null and body=null. This is not equivalent to MethodHandles.iteratedLoop(...) call.
3. body - the body of the loop, which must not be null. It must accept an initial T parameter (for the iterated values), and then any additional loop-local variable plus loop parameters.
There is no 'definition' of 'local loop variables', although it could be deduced from
>> The result of the loop execution is the final value of the additional local state obtained by running init.
I suppose it would be good to mention what is 'loop-local variables' in clearer way.