F # equivalent to SortedDictionary from C #
new to F # I need to store a bunch of object lists according to float where the collection of lists is sorted according to float. I know that in C # I would use
SortedDictionary<float, List<obj>>
as the implementation is a red black tree allowing input and search in log (n). But what is the best way to attack the situation in F #. I tried using SortedDitionary, but I can't reference SortedDictionary [int] to find the value, so it makes it essentially useless (I could be wrong).
thanks for the help
+3
source to share
3 answers
The first tiger to do is read Okasaki's book Purely Functional Data Structures
This has ML implementations that can help you
+1
source to share