Jump to content

Loops/Wrong ranges: Difference between revisions

m
Line 487:
,["2","-2","1","Start more than stop: positive increment","[2,3.. -2]",show [2,3.. -2]]
,["2","2","1","Start equal stop: positive increment","[2,3..2]",show [2,3..2]]
,["2","2","-1","Start equal stop: negative increment","[2,-31..2]",show [2,-31..2]]
,["2","2","0","Start equal stop: zero increment","[2,2..2]","Infinite loop of 2 <=> repeat 2"]
,["0","0","0","Start equal stop equal zero: zero increment","[0,0..0]", "Infinite loop of 0 <=> repeat 0"]]
Line 502:
zss@(z:zs) = zipWith (\us bs -> (concat $ zipWith (\x y -> (ver:x) ++ y) us bs) ++ [ver]) contents bss</lang>
{{out}}
<pre>+-----+----+---------+-------------------------------------------+---------------------+---------------------------------+
<pre>
+-----+----+---------+-------------------------------------------+---------------------+---------------------------------+
|start|stop|increment|Comment |Code |Result/Analysis |
+-----+----+---------+-------------------------------------------+---------------------+---------------------------------+
Line 512 ⟶ 511:
|2 |-2 |1 |Start more than stop: positive increment |[2,3.. -2] |[] |
|2 |2 |1 |Start equal stop: positive increment |[2,3..2] |[2] |
|2 |2 |-1 |Start equal stop: negative increment |[2,-31..2] |[2] |
|2 |2 |0 |Start equal stop: zero increment |[2,2..2] |Infinite loop of 2 <=> repeat 2 |
|0 |0 |0 |Start equal stop equal zero: zero increment|[0,0..0] |Infinite loop of 0 <=> repeat 0 |
+-----+----+---------+-------------------------------------------+---------------------+---------------------------------+</pre>
</pre>
 
=={{header|Huginn}}==
678

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.