Handbook
Glossary
remove-last ( obj seq -- seq' )
Vocabulary
sequences
.
extras
Inputs
obj
an
object
seq
a
sequence
Outputs
seq'
a
sequence
Word description
Remove the last occurrence of
obj
in
seq
.
Definition
USING:
kernel
sequences
;
IN:
sequences.extras
:
remove-last
( obj seq -- seq' )
[
last-index
]
keep
over
[
remove-nth
]
[
nip
]
if
;