21 lines
423 B
Plaintext
21 lines
423 B
Plaintext
[ lookandsay ] is encode ( $ --> $ )
|
|
|
|
[ $ "" 0 rot
|
|
witheach
|
|
[ dup
|
|
char 0 char 9 1+
|
|
within iff
|
|
[ char 0 -
|
|
swap 10 * + ]
|
|
else
|
|
[ swap of join
|
|
0 ] ]
|
|
drop ] is decode ( $ --> $ )
|
|
|
|
$ "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW"
|
|
dup echo$ cr
|
|
encode
|
|
dup echo$ cr
|
|
decode
|
|
echo$ cr
|