29 lines
599 B
Plaintext
29 lines
599 B
Plaintext
include ..\Utilitys.pmt
|
|
|
|
def repstr /# s n -- s #/
|
|
"" swap
|
|
for drop
|
|
over chain
|
|
endfor
|
|
nip
|
|
enddef
|
|
|
|
|
|
def repString /# s -- s #/
|
|
len dup var sz
|
|
2 / 1 swap 2 tolist for
|
|
var i
|
|
1 i slice var chunk
|
|
chunk sz i / 1 + repstr
|
|
1 sz slice nip over
|
|
== if chunk exitfor endif
|
|
endfor
|
|
len sz == sz 1 == or if ": No repeat string" chain else ": " swap chain chain endif
|
|
enddef
|
|
|
|
( "1001110011" "1110111011" "0010010010" "1010101010" "1111111111" "0100101101" "0100100" "101" "11" "00" "1" )
|
|
|
|
len for
|
|
get repString print nl
|
|
endfor
|