Index: doc/proposals/iterators.md
===================================================================
--- doc/proposals/iterators.md	(revision fc6c410d83adc0c4b2fa2a52508065646d7a6414)
+++ doc/proposals/iterators.md	(revision ebf8ca5fd2d4a1e12022556c0cc689ccac0d0414)
@@ -2,5 +2,5 @@
 =========
 This is the proposal for adding iterators to Cforall and the standard
-libary. Iterators provide a common interface for sequences of values in
+library. Iterators provide a common interface for sequences of values in
 the language. Many inputs and outputs can be described in terms of sequences,
 creating a common interface that can be used in many places.
@@ -15,9 +15,9 @@
 The operation is "get the next value in the sequence", but this actually has
 several parts, in that it has to check if there are move values, return the
-next one if there is, and update any internal information in the iterator.
+next one if there is one, and update any internal information in the iterator.
 For example: `Maybe(Item) next(Iter &);`.
 
 Now, iterators can have other operations. Notably, they are often also
-iterables that return themselves. They can also have a veriaty of iterator
+iterables that return themselves. They can also have a verity of iterator
 transformers built in.
 
@@ -25,5 +25,5 @@
 
 Anything that you can get an iterator from is called an iterable. There
-is an operation to get an iterator from an iterator.
+is an operation to get an iterator from an iterable.
 
 Range For Loop
@@ -31,5 +31,5 @@
 One part of the language that could be reworked to make good use of this is
 for loops. In short, remove most of the special rules that can be done inside
-the identifer and make it a generic range for loop:
+the identifier and make it a generic range for loop:
 
     ```
@@ -39,12 +39,12 @@
 The common way to implement this is that expression produces an iterable.
 The for loop gets an iterator from the iterable (which is why iterators are
-often iterables, so they can be passed in with the same iterface) and stores
+often iterables, so they can be passed in with the same interface) and stores
 it. Then, for each value in the iterator, the loop binds the value to the
 identifier and then executes the statement. The loop exits after every value
-has been used and the iterator is exausted.
+has been used and the iterator is exhausted.
 
 For the chained for loop (`for (i; _: j; _)`) can still have its existing
 behaviour, advancing through each range in parallel and stopping as soon
-as the first one is exausted.
+as the first one is exhausted.
 
 Ranges
@@ -54,5 +54,5 @@
 logically instead of by copy.
 
-The purpose of this container is to bridge the new iterator iterfaces with
+The purpose of this container is to bridge the new iterator interfaces with
 the existing range syntax. The range syntax would become an operator that
 returns a range object, which can be used as any other type.
@@ -91,5 +91,5 @@
 pointers.
 
-Rust also has a imparative implementation of a functional style of iterators,
+Rust also has a imperative implementation of a functional style of iterators,
 including a great number of standard transformers. Otherwise, it is very
 similar to Python.
Index: doc/user/user.tex
===================================================================
--- doc/user/user.tex	(revision fc6c410d83adc0c4b2fa2a52508065646d7a6414)
+++ doc/user/user.tex	(revision ebf8ca5fd2d4a1e12022556c0cc689ccac0d0414)
@@ -11,6 +11,6 @@
 %% Created On       : Wed Apr  6 14:53:29 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Mon Feb 14 17:20:39 2022
-%% Update Count     : 5382
+%% Last Modified On : Mon Aug 22 23:43:30 2022
+%% Update Count     : 5503
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -964,50 +964,53 @@
 
 \begin{figure}
-\begin{tabular}{@{}l@{\hspace{25pt}}|l@{}}
-\multicolumn{1}{@{}c@{\hspace{25pt}}|}{loop control} & \multicolumn{1}{c@{}}{output} \\
+\begin{tabular}{@{}l@{\hspace{40pt}}|l@{}}
+\multicolumn{1}{@{}c@{\hspace{40pt}}|}{loop control} & \multicolumn{1}{c@{}}{output} \\
 \hline
 \begin{cfa}
-while ®($\,$)® { sout | "empty"; break; }
-do { sout | "empty"; break; } while ®($\,$)®;
-for ®($\,$)® { sout | "empty"; break; }
-for ( ®0® ) { sout | "A"; } sout | "zero";
-for ( ®1® ) { sout | "A"; }
-for ( ®10® ) { sout | "A"; }
-for ( ®= 10® ) { sout | "A"; }
-for ( ®1 ~= 10 ~ 2® ) { sout | "B"; }
-for ( ®10 -~= 1 ~ 2® ) { sout | "C"; }
-for ( ®0.5 ~ 5.5® ) { sout | "D"; }
-for ( ®5.5 -~ 0.5® ) { sout | "E"; }
-for ( ®i; 10® ) { sout | i; }
-for ( ®i; = 10® ) { sout | i; }
-for ( ®i; 1 ~= 10 ~ 2® ) { sout | i; }
-for ( ®i; 10 -~= 1 ~ 2® ) { sout | i; }
-for ( ®i; 0.5 ~ 5.5® ) { sout | i; }
-for ( ®i; 5.5 -~ 0.5® ) { sout | i; }
-for ( ®ui; 2u ~= 10u ~ 2u® ) { sout | ui; }
-for ( ®ui; 10u -~= 2u ~ 2u® ) { sout | ui; }
+while () { sout | "empty"; break; }
+do { sout | "empty"; break; } while ();
+for () { sout | "empty"; break; }							$\C[3in]{sout | nl | nlOff;}$
+
+for ( 0 ) { sout | "A"; } sout | "zero";					$\C{sout | nl;}$
+for ( 1 ) { sout | "A"; }									$\C{sout | nl;}$
+for ( 10 ) { sout | "A"; }									$\C{sout | nl;}$
+for ( ~= 10 ) { sout | "A"; }								$\C{sout | nl;}$
+for ( 1 ~= 10 ~ 2 ) { sout | "B"; }							$\C{sout | nl;}$
+for ( 1 -~= 10 ~ 2 ) { sout | "C"; }						$\C{sout | nl;}$
+for ( 0.5 ~ 5.5 ) { sout | "D"; }							$\C{sout | nl;}$
+for ( 0.5 -~ 5.5 ) { sout | "E"; }							$\C{sout | nl;}$
+for ( i; 10 ) { sout | i; }									$\C{sout | nl;}$
+for ( i; ~= 10 ) { sout | i; }								$\C{sout | nl;}$
+for ( i; 1 ~= 10 ~ 2 ) { sout | i; }						$\C{sout | nl;}$
+for ( i; 1 -~= 10 ~ 2 ) { sout | i; }						$\C{sout | nl;}$
+for ( i; 0.5 ~ 5.5 ) { sout | i; }							$\C{sout | nl;}$
+for ( i; 0.5 -~ 5.5 ) { sout | i; }							$\C{sout | nl;}$
+for ( ui; 2u ~= 10u ~ 2u ) { sout | ui; }					$\C{sout | nl;}$
+for ( ui; 2u -~= 10u ~ 2u ) { sout | ui; }					$\C{sout | nl | nl | nl;}$
+
 enum { N = 10 };
-for ( ®N® ) { sout | "N"; }
-for ( ®i; N® ) { sout | i; }
-for ( ®i; N -~ 0® ) { sout | i; }
-const int start = 3, comp = 10, inc = 2;
-for ( ®i; start ~ comp ~ inc + 1® ) { sout | i; }
-for ( i; 1 ~ ®@® ) { if ( i > 10 ) break; sout | i; }
-for ( i; 10 -~ ®@® ) { if ( i < 0 ) break; sout | i; }
-for ( i; 2 ~ ®@® ~ 2 ) { if ( i > 10 ) break; sout | i; }
-for ( i; 2.1 ~ ®@® ~ ®@® ) { if ( i > 10.5 ) break; sout | i; i += 1.7; }
-for ( i; 10 -~ ®@® ~ 2 ) { if ( i < 0 ) break; sout | i; }
-for ( i; 12.1 ~ ®@® ~ ®@® ) { if ( i < 2.5 ) break; sout | i; i -= 1.7; }
-for ( i; 5 ®:® j; -5 ~ @ ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 -~ @ ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 ~ @ ~ 2 ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 -~ @ ~ 2 ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 ~ @ ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 -~ @ ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 ~ @ ~ 2 ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 -~ @ ~ 2 ) { sout | i | j; }
-for ( i; 5 ®:® j; -5 -~ @ ~ 2 ®:® k; 1.5 ~ @ ) { sout | i | j | k; }
-for ( i; 5 ®:® j; -5 -~ @ ~ 2 ®:® k; 1.5 ~ @ ) { sout | i | j | k; }
-for ( i; 5 ®:® k; 1.5 ~ @ ®:® j; -5 -~ @ ~ 2 ) { sout | i | j | k; }
+for ( N ) { sout | "N"; }									$\C{sout | nl;}$
+for ( i; N ) { sout | i; }									$\C{sout | nl;}$
+for ( i; -~ N ) { sout | i; }								$\C{sout | nl | nl | nl;}$
+
+const int low = 3, high = 10, inc = 2;
+for ( i; low ~ high ~ inc + 1 ) { sout | i; }				$\C{sout | nl;}$
+for ( i; 1 ~ @ ) { if ( i > 10 ) break; sout | i; }			$\C{sout | nl;}$
+for ( i; @ -~ 10 ) { if ( i < 0 ) break; sout | i; }		$\C{sout | nl;}$
+for ( i; 2 ~ @ ~ 2 ) { if ( i > 10 ) break; sout | i; }		$\C{sout | nl;}$
+for ( i; 2.1 ~ @ ~ @ ) { if ( i > 10.5 ) break; sout | i; i += 1.7; } $\C{sout | nl;}$
+for ( i; @ -~ 10 ~ 2 ) { if ( i < 0 ) break; sout | i; }	$\C{sout | nl;}$
+for ( i; 12.1 ~ @ ~ @ ) { if ( i < 2.5 ) break; sout | i; i -= 1.7; } $\C{sout | nl;}$
+for ( i; 5 : j; -5 ~ @ ) { sout | i | j; }					$\C{sout | nl;}$
+for ( i; 5 : j; @ -~ -5 ) { sout | i | j; }					$\C{sout | nl;}$
+for ( i; 5 : j; -5 ~ @ ~ 2 ) { sout | i | j; }				$\C{sout | nl;}$
+for ( i; 5 : j; @ -~ -5 ~ 2 ) { sout | i | j; }				$\C{sout | nl;}$
+for ( i; 5 : j; -5 ~ @ ) { sout | i | j; }					$\C{sout | nl;}$
+for ( i; 5 : j; @ -~ -5 ) { sout | i | j; }					$\C{sout | nl;}$
+for ( i; 5 : j; -5 ~ @ ~ 2 ) { sout | i | j; }				$\C{sout | nl;}$
+for ( i; 5 : j; @ -~ -5 ~ 2 ) { sout | i | j; }				$\C{sout | nl;}$
+for ( i; 5 : j; @ -~ -5 ~ 2 : k; 1.5 ~ @ ) { sout | i | j | k; } $\C{sout | nl;}$
+for ( i; 5 : j; @ -~ -5 ~ 2 : k; 1.5 ~ @ ) { sout | i | j | k; } $\C{sout | nl;}$
+for ( i; 5 : k; 1.5 ~ @ : j; @ -~ -5 ~ 2 ) { sout | i | j | k; } $\C{sout | nl;}\CRT$
 \end{cfa}
 &
@@ -1016,4 +1019,5 @@
 empty
 empty
+
 zero
 A
@@ -1033,7 +1037,9 @@
 10 8 6 4 2
 
+
 N N N N N N N N N N
 0 1 2 3 4 5 6 7 8 9
 10 9 8 7 6 5 4 3 2 1
+
 
 3 6 9
@@ -1073,23 +1079,7 @@
 
 Looping a fixed number of times, possibly with a loop index, occurs frequently.
-\CFA condenses simply looping to facilitate coding speed and safety.
-The \Indexc{for}, \Indexc{while}, and \Indexc{do} loop-control is augmented as follows \see{examples in \VRef[Figure]{f:LoopControlExamples}}:
-\begin{itemize}[itemsep=0pt]
-\item
-©0© is the implicit start value;
-\item
-©1© is the implicit increment value.
-\item
-The up-to range uses operator ©+=© for increment;
-\item
-The down-to range uses operator ©-=© for decrement.
-\item
-The loop index is polymorphic in the type of the comparison value N (when the start value is implicit) or the start value M.
-\begin{cfa}
-for ( i; ®5® )					$\C[2.5in]{// typeof(5) i; 5 is comparison value}$
-for ( i; ®1.5®~5.5~0.5 )		$\C{// typeof(1.5) i; 1.5 is start value}$
-\end{cfa}
-\item
-An empty conditional implies comparison value of ©1© (true).
+\CFA condenses simply looping to facilitate coding speed and safety~\see{examples in \VRef[Figure]{f:LoopControlExamples}}.
+
+The \Indexc{for}, \Indexc{while}, and \Indexc{do} loop-control allow an empty conditional, which implies a comparison value of ©1© (true).
 \begin{cfa}
 while ( ®/*empty*/®  )			$\C{// while ( true )}$
@@ -1097,45 +1087,91 @@
 do ... while ( ®/*empty*/®  )	 $\C{// do ... while ( true )}$
 \end{cfa}
-\item
-A comparison N is implicit up-to exclusive range [0,N\R{)}.
+
+The ©for© control has 4 new loop-control operators that are not overloadable:
+\begin{description}[itemsep=0pt,parsep=0pt]
+\item
+\Indexc{\~} (tilde) \Index{up-to exclusive range},
+\item
+\Indexc{\~=} (tilde equal) \Index{up-to inclusive range},
+\item
+\Indexc{-\~} (minus tilde) \Index{down-to exclusive range},
+\item
+\Indexc{-\~=} (minus tilde equal) \Index{down-to inclusive range}.
+\end{description}
+
+The ©for© index components, low (L), high (H), and increment (I), are optional.
+If missing:
+\begin{itemize}[itemsep=0pt,parsep=0pt]
+\item
+\Indexc{0} is the implicit low value.
+\item
+\Indexc{1} is the implicit increment value.
+\item
+The up-to range uses operator \Indexc{+=} for increment.
+\item
+The down-to range uses operator \Indexc{-=} for decrement.
+\end{itemize}
+
+If no type is specified for the loop index, it is the type of the high value H (when the low value is implicit) or the low value L.
+\begin{cfa}
+for ( ®5® )						$\C{// typeof(5) anonymous-index; 5 is high value}$
+for ( i; ®1.5® ~ 5.5 )			$\C{// typeof(1.5) i; 1.5 is low value}$
+for ( ®int i®; 0 ~ 10 ~ 2 )		$\C{// int i; type is explicit}$
+\end{cfa}
+
+The following are examples for constructing different for-control:
+\begin{itemize}[itemsep=0pt]
+\item
+H is implicit up-to exclusive range [0,H\R{)}.
 \begin{cfa}
 for ( ®5® )						$\C{// for ( typeof(5) i; i < 5; i += 1 )}$
 \end{cfa}
 \item
-A comparison ©=© N is implicit up-to inclusive range [0,N\R{]}.
-\begin{cfa}
-for ( ®=®5 )					$\C{// for ( typeof(5) i; i <= 5; i += 1 )}$
-\end{cfa}
-\item
-The up-to range M ©~©\index{~@©~©} N means exclusive range [M,N\R{)}.
-\begin{cfa}
-for ( 1®~®5 )					$\C{// for ( typeof(1) i = 1; i < 5; i += 1 )}$
-\end{cfa}
-\item
-The up-to range M ©~=©\index{~=@©~=©} N means inclusive range [M,N\R{]}.
-\begin{cfa}
-for ( 1®~=®5 )					$\C{// for ( typeof(1) i = 1; i <= 5; i += 1 )}$
-\end{cfa}
-\item
-The down-to range M ©-~©\index{-~@©-~©} N means exclusive range [N,M\R{)}.
-\begin{cfa}
-for ( 1®-~®5 )					$\C{// for ( typeof(1) i = 5; i > 0; i -= 1 )}$
-\end{cfa}
-\item
-The down-to range M ©-~=©\index{-~=@©-~=©} N means inclusive range [N,M\R{]}.
-\begin{cfa}
-for ( 1®-~=®5 )					$\C{// for ( typeof(1) i = 5; i >= 0; i -= 1 )}$
+©~=© H is implicit up-to inclusive range [0,H\R{]}.
+\begin{cfa}
+for ( ®~=® 5 )					$\C{// for ( typeof(5) i; i <= 5; i += 1 )}$
+\end{cfa}
+\item
+L ©~©\index{~@©~©} H is explicit up-to exclusive range [L,H\R{)}.
+\begin{cfa}
+for ( 1 ®~® 5 )					$\C{// for ( typeof(1) i = 1; i < 5; i += 1 )}$
+\end{cfa}
+\item
+L ©~=©\index{~=@©~=©} H is explicit up-to inclusive range [L,H\R{]}.
+\begin{cfa}
+for ( 1 ®~=® 5 )					$\C{// for ( typeof(1) i = 1; i <= 5; i += 1 )}$
+\end{cfa}
+\item
+L ©-~©\index{-~@©-~©} H is explicit down-to exclusive range [H,L\R{)}, where L and H are implicitly interchanged to make the range down-to.
+\begin{cfa}
+for ( 1 ®-~® 5 )					$\C{// for ( typeof(1) i = 5; i > 0; i -= 1 )}$
+\end{cfa}
+\item
+L ©-~=©\index{-~=@©-~=©} H is explicit down-to inclusive range [H,L\R{]}, where L and H are implicitly interchanged to make the range down-to.
+\begin{cfa}
+for ( 1 ®-~=® 5 )					$\C{// for ( typeof(1) i = 5; i >= 0; i -= 1 )}$
 \end{cfa}
 \item
 ©@© means put nothing in this field.
 \begin{cfa}
-for ( 1~®@®~2 )					$\C{// for ( typeof(1) i = 1; /*empty*/; i += 2 )}$
-\end{cfa}
-\item
-©:© means start another index.
-\begin{cfa}
-for ( i; 5 ®:® j; 2~12~3 )		$\C{// for ( typeof(i) i = 1, j = 2; i < 5 \&\& j < 12; i += 1, j += 3 )}\CRT$
+for ( i; 1 ~ ®@® ~ 2 )			$\C{// for ( typeof(1) i = 1; \R{/* empty */}; i += 2 )}$
+for ( i; 1 ~ 10 ~ ®@® )			$\C{// for ( typeof(1) i = 1; i < 10; \R{/* empty */} )}$
+for ( i; 1 ~ ®@® ~ ®@® )		$\C{// for ( typeof(1) i = 1; /*empty*/; \R{/* empty */} )}$
+\end{cfa}
+L cannot be elided for the up-to range, \lstinline{@ ~ 5}, and H for the down-to range, \lstinline{1 -~ @}, because then the loop index is uninitialized.
+Similarly, the high value cannot be elided is an anonymous loop index (©1 ~ @©), as there is no index to stop the loop.
+\item
+©:© means low another index.
+\begin{cfa}
+for ( i; 5 ®:® j; 2 ~ 12 ~ 3 )		$\C{// for ( typeof(i) i = 1, j = 2; i < 5 \&\& j < 12; i += 1, j += 3 )}$
 \end{cfa}
 \end{itemize}
+\R{Warning}: specifying the down-to range maybe unexcepted because the loop control \emph{implicitly} switches the L and H values (and toggles the increment/decrement for I):
+\begin{cfa}
+for ( i; 1 ~ 10 )	${\C[1.5in]{// up range}$
+for ( i; 1 -~ 10 )	${\C{// down range}$
+for ( i; ®10 -~ 1® )	${\C{// \R{WRONG down range!}}\CRT}$
+\end{cfa}
+The reason for this sematics is that the range direction can be toggled by adding/removing the minus, ©'-'©, versus interchanging the L and H expressions, which has a greater chance of introducing errors.
 
 
@@ -4794,5 +4830,5 @@
 	int id;
 	float size;
-	Parts * optionalParts;
+	int * optionalint;
 };
 
@@ -4801,35 +4837,33 @@
 // Subsequent arguments can be specified for initialization
 
-void ?{}(Widget &w) { // default constructor
+void ?{}( Widget & w ) { $\C{// default constructor}$
 	w.id = -1;
 	w.size = 0.0;
-	w.optionalParts = 0;
+	w.optionalint = 0p;
 }
 
 // constructor with values (does not need to include all fields)
-void ?{}(Widget &w, int id, float size) {
+void ?{}( Widget & w, int id, float size ) {
 	w.id = id;
 	w.size = size;
-	w.optionalParts = 0;
-}
-
-// ^? is the destructor operator identifier
-void ^?(Widget &w) { // destructor
+	w.optionalint = 0p;
+}
+
+// ^?{} is the destructor operator identifier
+void ^?{}( Widget & w ) { $\C{// destructor}$
 	w.id = 0;
 	w.size = 0.0;
-	if (w.optionalParts != 0) {
-	// This is the only pointer to optionalParts, free it
-	free(w.optionalParts);
-	w.optionalParts = 0;
+	if ( w.optionalint != 0p ) {
+		free( w.optionalint );
+		w.optionalint = 0p;
 	}
 }
 
-Widget baz; // reserve space only
-Widget foo{}; // calls default constructor
-Widget bar{23, 2.45}; // calls constructor with values
-baz{24, 0.91}; // calls constructor with values
-?{}(baz, 24, 0.91}; // explicit call to constructor
-^bar; // explicit call to destructor
-^?(bar); // explicit call to destructor
+Widget baz; $\C{// reserve space only}$
+Widget foo{}; $\C{// calls default constructor}$
+Widget bar{ 23, 2.45 }; $\C{// calls constructor with values}$
+baz{ 24, 0.91 }; $\C{// calls constructor with values}$
+?{}( baz, 24, 0.91 ); $\C{// explicit call to constructor}$
+^?{} (bar ); $\C{// explicit call to destructor}$
 \end{cfa}
 \caption{Constructors and Destructors}
