Run-length encoding: Difference between revisions

Content added Content deleted
Line 1,697: Line 1,697:
A numeric approach, based on a discussion in the J forums:
A numeric approach, based on a discussion in the J forums:


<lang j>torle=: ({. , #);.2~ 1,2&(~:/\)
<lang j>torle=: ({. , #);.1~ 1,2&(~:/\)
frle=: #~/@:|:</lang>
frle=: #~/@:|:</lang>