Sun May 12 15:25:53 EDT 2019
Construction of loops
Basically, a loop lifts an expression over an array. It is
essentially "map". If there is back-reference, it is a "fold". If
there is random access back-reference, it is a "triangle fold".
It seems that this problem can be done quite simply by using full grid
notation. It would only need each "map" or "fold" to add an extra
It's important to realize that this is not just for scalars! Each
loop is a +1 in the number of grid parameters.
Because the difference between map, fold and triangle fold is just
array access, it might be good enough to focus on map.