Handbook
Glossary
next ( seq -- newseq )
Vocabulary
rosetta-code.hofstadter-q
Inputs
seq
an
object
Outputs
newseq
an
object
Definition
USING:
kernel
math
sequences
;
IN:
rosetta-code.hofstadter-q
:
next
( seq -- newseq )
dup
2
tail*
over
length
[
swap
-
]
curry
map
[
dupd
swap
nth
]
map
0
[
+
]
reduce
suffix
;