Options
All
  • Public
  • Public/Protected
  • All
Menu

Set Collections only represent values. They have no associated keys or indices. Duplicate values are possible in the lazy Seq.Sets, however the concrete Set Collection does not allow duplicate values.

Collection methods on Collection.Set such as map and forEach will provide the value as both the first and second arguments to the provided function.

const { Collection } = require('immutable')
const seq = Collection.Set([ 'A', 'B', 'C' ])
// Seq { "A", "B", "C" }
seq.forEach((v, k) =>
assert.equal(v, k)
)

Generated using TypeDoc