diff options
Diffstat (limited to 'lib/pure/collections/intsets.nim')
-rw-r--r-- | lib/pure/collections/intsets.nim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/pure/collections/intsets.nim b/lib/pure/collections/intsets.nim new file mode 100644 index 000000000..765a23e97 --- /dev/null +++ b/lib/pure/collections/intsets.nim @@ -0,0 +1,23 @@ +# +# +# Nim's Runtime Library +# (c) Copyright 2012 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## Specialization of the generic `packedsets module <packedsets.html>`_ +## (see its documentation for more examples) for ordinal sparse sets. + +import std/private/since +import std/packedsets +export packedsets + +type + IntSet* = PackedSet[int] + +proc toIntSet*(x: openArray[int]): IntSet {.since: (1, 3), inline.} = toPackedSet[int](x) + +proc initIntSet*(): IntSet {.inline.} = initPackedSet[int]() + |