Variable declaration reset: Difference between revisions

Content added Content deleted
(J)
m (J: when showing the idiomatic approach, use the idomatic syntax for expressing a numeric list)
Line 177: Line 177:
First off, the idiomatic J approach to finding indices of numbers which match their predecessors would be:
First off, the idiomatic J approach to finding indices of numbers which match their predecessors would be:


<lang J> 1+I.(}:=}.) 1,2,2,3,4,4,5
<lang J> 1+I.(}:=}.) 1 2 2 3 4 4 5
2 5</lang>
2 5</lang>