Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
argsort ( seq quot: ( obj1 obj2 -- <=> ) -- sortedseq )
Vocabulary
sorting.extras
Definition
USING:
assocs
kernel
sequences
sequences.private
sorting
;
IN:
sorting.extras
:
argsort
( seq quot: ( obj1 obj2 -- <=> ) -- sortedseq )
[
dup
length
iota
zip
]
dip
[
[
first-unsafe
]
bi@
]
prepose
sort
[
second-unsafe
]
map!
;
inline