Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 527

Is it possible to sort a Dynarray in OCaml?

$
0
0

From what I can tell, each data type seems to have its own type-specific .sort implementation. This means that, although the stdlib Dynarray uses Array as a backing, I can't actually use the Array.sort function.

Is there any canonical way to generally sort structures like I would with C++'s std::sort? Is there some Dynarray.sort that I just am unable to find?

Otherwise, I'm aware of other Dynarray implementations such as those in Batteries, but they don't appear to contain a sort implementation either... I must be missing something as surely I'm not expected to write my own sorting algorithms.


Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>