Macaulay2 » Documentation
Packages » Macaulay2Doc » combinatorics » Set » set
next | previous | forward | backward | up | index | toc

# set -- make a set

- Usage:
    `set v`
    `set(v1,v2,...)`
- Inputs:
  - v, a visible list or a hash table
- Outputs:
  - a set, the set whose elements are the members of the list v or keys of the hash table v

## Description

    i1 : v = {1,2,3,2,1}

    o1 = {1, 2, 3, 2, 1}

    o1 : List

    i2 : S = set v

    o2 = set {1, 2, 3}

    o2 : Set

    i3 : T = set(a,b,c,a,b,d)

    o3 = set {c, d, a, b}

    o3 : Set

## See also

- Set -- the class of all sets

## Ways to use set:

- `set(HashTable)`
- `set(Set)`
- `set(VisibleList)`

## For the programmer

The object set is a method function with a single argument.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/set-doc.m2:20:0.