Handbook
Glossary
rank-completions ( results -- newresults )
Fuzzy completion
Prev:
complete ( full short -- score )
Vocabulary
tools
.
completion
Inputs
results
an alist
Outputs
newresults
an alist
Word description
Sorts
results
by the first element of each pair, and discards the low 33% of the results.
Definition
USING:
assocs
kernel
math
math.order
sequences
sorting
;
IN:
tools.completion
:
rank-completions
( results -- newresults )
dup
length
25
>
[
[
[
first
]
[
max
]
map-reduce
4
/f
]
keep
[
first
<
]
with
filter
]
when
sort-keys
<reversed>
values
;