Handbook
Glossary
(look-and-say) ( str -- )
Vocabulary
rosetta-code.look-and-say
Inputs
str
an
object
Outputs
None
Definition
USING:
kernel
make
math
math.parser
sequences
;
IN:
rosetta-code.look-and-say
:
(look-and-say)
( str -- )
unclip-slice
swap
[
1
]
2dip
[
2dup
=
[
drop
[
1
+
]
dip
]
[
[
[
number>string
%
]
dip
,
1
]
dip
]
if
]
each
[
number>string
%
]
[
,
]
bi*
;