4 ms·
F#: Lists - The Basics
- marketer 19y agoUnfortunately, lists only exist in the pure F# model (ocaml-compat). They don't implement ICollection, and this is required to use lists in most conceivable .net libraries. To get a list that implements ICollection, you need to use sequences. Sequences are more of a pain, because type inference is a lot more restrictive on them, and they really don't play nicely with polymorphism. You can convert lists to sequences, and vice-versa, but this gets annoying after a while. In short, F# lists are cool, but you hardly ever use them in real code.