Handbook
Glossary
argsort ( seq quot: ( obj1 obj2 -- <=> ) -- sortedseq )
Vocabulary
sorting
.
extras
Inputs
seq
an
object
quot
a
quotation
with stack effect
( obj1 obj2 -- <=> )
Outputs
sortedseq
an
object
Definition
USING:
assocs
kernel
sequences
sequences.private
sorting
;
IN:
sorting.extras
:
argsort
( seq quot: ( obj1 obj2 -- <=> ) -- sortedseq )
[
zip-index
]
dip
[
[
first-unsafe
]
bi@
]
prepose
sort-with
[
second-unsafe
]
map!
;
inline