From 5a797c83ee10fef1537b575342bc797e32279c5f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 27 Oct 2007 14:43:30 -0400 Subject: [PATCH] tools.completion no longer depends on number tower --- extra/tools/completion/completion.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/tools/completion/completion.factor b/extra/tools/completion/completion.factor index caa2eb42f1..4c19bbc8db 100644 --- a/extra/tools/completion/completion.factor +++ b/extra/tools/completion/completion.factor @@ -39,7 +39,7 @@ vectors words assocs combinators sorting ; : score ( full fuzzy -- n ) dup [ - [ [ length ] 2apply - 15 swap [-] 3 / ] 2keep + [ [ length ] 2apply - 15 swap [-] 3 /f ] 2keep runs [ [ 0 [ pick score-1 max ] reduce nip ] keep length * + @@ -50,7 +50,7 @@ vectors words assocs combinators sorting ; : rank-completions ( results -- newresults ) sort-keys - [ 0 [ first max ] reduce 3 / ] keep + [ 0 [ first max ] reduce 3 /f ] keep [ first < ] curry* subset [ second ] map ;