# Idiom #122 Declare an enumeration

Create an enumerated type Suit with 4 possible values SPADES, HEARTS, DIAMONDS, CLUBS.

``````enum Suit{
HEARTS,
DIAMONDS,
CLUBS
}``````
``type Suit is (Spades, Hearts, Diamonds, Clubs);``
``````enum Suit {
HEARTS,
DIAMONDS,
CLUBS
};``````
``type suit = Spades | Hearts | Diamonds | Clubs``
``(def suit #{:SPADES :HEARTS :DIAMONDS :CLUBS})``
``default clojure none required``
``````(def Suit #{"Spades" "Hearts"  "Diamonds" "Clubs"})
``````
``````enum class Suit {
};``````
``````enum class Color : char{
Red, Black, Green
};``````
``````enum Suit
{
Hearts,
Diamonds,
Clubs
}``````
``````enum Suit{
HEARTS,
DIAMONDS,
CLUBS
}``````
``````enum Suit {
HEARTS,
DIAMONDS,
CLUBS,
}``````
``````@suits %{
"HEARTS" => 2,
"DIAMONDS" => 3,
"CLUBS" => 4
}

def main, do: @suits``````
``````enum, bind(c)
enumerator :: spades, hearts, diamonds, clubs
end enum``````
``````type Suit int

const (
Hearts
Diamonds
Clubs
)``````
``data Suit = SPADES | HEARTS | DIAMONDS | CLUBS deriving (Enum)``
``````const spades = 0
const hearts = 1
const diamonds = 2
const clubs = 3``````
``````enum Suit{
HEARTS,
DIAMONDS,
CLUBS;
}``````
``````Suit = {
HEARTS=2,
DIAMONDS=3,
CLUBS=4
}``````
``````typedef NS_ENUM(int, Suit) {
};``````
``````abstract class Suit
{
const HEARTS	 = 1;
const DIAMONDS = 2;
const CLUBS	 = 3;
}``````
``````enum Suit
{
case HEARTS;
case DIAMONDS;
case CLUBS;
}
``````
``````Type
Suit = (Spades, Hearts, Diamonds, Clubs);``````
``````my %suit = (
HEARTS   => 2,
DIAMONDS => 3,
CLUBS    => 4,
);``````
``from enum import Enum``
``````class Suit(Enum):
HEARTS = 2
DIAMONDS = 3
CLUBS = 4``````
``````class Suit:
SPADES, HEARTS, DIAMONDS, CLUBS = range(4)``````
``require 'ruby-enum'``
``````class Colors
include Ruby::Enum

define :HEARTS, "hearts"
define :DIAMONDS, "diamonds"
define :CLUBS, "clubs"
end``````
``````enum Suit {
``````Enum Suit