On 28/01/2014, at 7:46 AM, srean wrote: > I really like the idea that it is so convenient to partition an interval with > out +1 -1 noise > > [a, b) = [a, c) Union [c, b) > > I dont have to do worry with > > [a, c] [c+1 b] and make sure the empty intervals are appropriately special > cased etc. > > The dangerous situation is when a > b.
Sure, so lets have a coherent design proposal :) Unbalanced brackets are out: too many tools would die. Maybe \[1,42\) would work .. might confuse MathJax though. [MathJax uses \( and \) for embedding math] A useful option might be: for var i in TYPE do .. for example for var i in [20] do .. where 20 is NOT an integer but a type. Then i has type 20 and ranges through case 0 of 20 to case 19 of 20, and for var i in [char] do .. ranges through all chars. We would also have for var i in 20 do .. which ranges through 0 to 19 inclusive. I still don't get a good feeling with these though .. hmmm .. The current general form is: for i in iterator do ... and for i in datastructure do where data structure has an iterator method. A bit more general: match (?x,?y) in datastructure do where the match argument is an arbitrary pattern. Only supports one case tho ;( -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language