Talk:Multisplit: Difference between revisions

m
Line 130:
1 2 2 3 3 4 6 7 8</lang>
 
(Note: its normally bad practice in J to use variables named 'x' and 'y' because they get values bound to them in functions. However, for purposes of illustration I think it's fine to pull code out of a function and use that with explicitly assigned values.)
 
Here, <code>sep</code> is a list of 0, 1 or 2, with 0 corresponding to '==', 1 corresponding to '!=' and 2 corresponding to '='. And, <code>begin</code> is a list of corresponding character positions. The values in <code>begin</code> are in non-decreasing order, and the values in <code>sep</code> are ascending when they correspond to equal values in <code>begin</code>.
6,962

edits