Run-length encoding: Difference between revisions

m
(→‎{{header|Kotlin}}: (made example usable with https://github.com/dkandalov/rosettacode-kotlin))
Line 4,069:
}</lang>
<lang zkl>fcn inflate(data){ //-->String
data.howza(3).pump(3,String,fcn(c){ // if c==1, read n,c2 and expand, else write c
fcn(c){ // if c==1, read n,c2 and expand, else write c
if(c=="\x01") return(Void.Read,2) else return(Void.Write,c) },
fcn(_,n,c){ c*n.toAsc() })
Anonymous user