summaryrefslogtreecommitdiffstats
path: root/stdlib/array.ml
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/array.ml')
-rw-r--r--stdlib/array.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/stdlib/array.ml b/stdlib/array.ml
index d77cf624d..175a3516f 100644
--- a/stdlib/array.ml
+++ b/stdlib/array.ml
@@ -144,6 +144,7 @@ let to_list a =
if i < 0 then res else tolist (i - 1) (unsafe_get a i :: res) in
tolist (length a - 1) []
+(* Cannot use List.length here because the List module depends on Array. *)
let rec list_length accu = function
| [] -> accu
| h::t -> list_length (succ accu) t
@@ -274,3 +275,5 @@ let stable_sort cmp a =
merge l2 l1 t 0 l2 a 0;
end;
;;
+
+let fast_sort = stable_sort;;