%mathpiper,def=".."

/*
.. operator is implemented with the Table function.
*/
10 # (count'from_IsInteger .. count'to_IsInteger)_(count'from <= count'to)
   <-- Table(i,i,count'from,count'to,1);
20 # (count'from_IsInteger .. count'to_IsInteger)
   <-- Table(i,i,count'from,count'to,-1);

%/mathpiper



%mathpiper_docs,name="..",categories="Operators"
*CMD .. --- construct a list of consecutive integers

*STD

*CALL
	n .. m

*PARMS

{n} -- integer. the first entry in the list

{m} -- integer, the last entry in the list

*DESC

This command returns the list {{n, n+1, n+2, ..., m}}. If {m} is
smaller than {n}, the empty list is returned. Note that the
{..} operator should be surrounded by spaces to keep the
parser happy, if "n" is a number. So one should write "{1 .. 4}" instead of "{1..4}".

This operator can help the user to program in the style of functional programming languages such as Miranda or Haskell.

*E.G.

In> 1 .. 4
Result: {1,2,3,4};

*SEE Table
%/mathpiper_docs