Handbook
Glossary
insertion-sort ( ... seq quot: ( ... elt -- ... elt' ) -- ... )
Vocabulary
sorting
.
insertion
Inputs
seq
an
object
quot
a
quotation
with stack effect
( ... elt -- ... elt' )
Outputs
None
Definition
USING:
kernel
math
sequences
sorting.insertion.private
;
IN:
sorting.insertion
:
insertion-sort
( ... seq quot: ( ... elt -- ... elt' ) -- ... )
over
length
[
insert
]
2with
1
-rot
each-integer-from
;
inline