Immutable collections

Immutable collections that compare as value types.

  • Immutable List<E> as IList<E>.
  • Immutable HashSet<E> as ISet<E>.
  • Immutable HashMap<K, V> as IMap<K, V>.

See an example for details.

If you want immutable data classes and discriminated unions that compare as value types, you might use data classes and discriminated unions.

Libraries

immutable_collection