Permalink
Browse files

unique requires double rev

  • Loading branch information...
1 parent cb77948 commit 7570f54f1188da2b7de4035eba6b867fe8a25fa1 @camlspotter camlspotter committed Feb 15, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 search.ml
View
@@ -166,12 +166,11 @@ let to_result (id, kind) =
let raw_search s modules paths =
init modules paths;
- sure (Searchid.search_string_type ~mode:`Exact) s
+ List.rev @@ ExtList.List.unique @@ List.rev (* unique removes first appearances *)
+ @@ sure (Searchid.search_string_type ~mode:`Exact) s
@ sure (Searchid.search_string_type ~mode:`Included) s
@ sure Searchid.search_pattern_symbol s
let search s modules paths =
- List.rev
- @@ ExtList.List.unique
- @@ List.rev_map ~f:to_result
+ List.map ~f:to_result
@@ raw_search s modules paths

0 comments on commit 7570f54

Please sign in to comment.