completions ( short candidates -- seq )
Fuzzy completion
Next:fuzzy ( full short -- indices )


Vocabulary
tools.completion

Inputs and outputs
shorta string
candidatesa sequence of pairs of the shape { obj full }
seqa sequence of pairs of the shape { score obj }


Word description
Calls completion to produce a sequence of { score obj } pairs, then calls rank-completions to sort them and discard the low 33%.

Definition
USING: kernel make sequences ;

IN: tools.completion

: completions ( short candidates -- seq )
[ ]
[ [ [ completion, ] with each ] { } make rank-completions ]
bi-curry if-empty ;