F# – Adding custom indexer and slicer to your type
Indexer If your have a type that represents a collection of values, adding a custom indexer gives you a natural way to index directly into the object using the .[ ] operator. Take this simple Calendar class for instance, which keeps a map (F# equivalent of a Dictionary<TKey, TValue>) of notes against DateTime values: By …
F# – Adding custom indexer and slicer to your type Read More »