<commit_before>defmodule Poker.Deck do
  @moduledoc """
  A standard 52 card deck.
  """

  @type card :: {pos_integer, :spades | :clubs | :hearts | :diamonds}

  @ranks Enum.to_list(2..14)
  @suits [:spades, :clubs, :hearts, :diamonds]

  @doc """
  Creates a shuffled deck.
  """
  @spec new() :: [card, ...]
  def new() do
    for suit <- @suits, rank <- @ranks do
      {rank, suit}
    end |> Enum.shuffle()
  end

  @doc """
  Create a Roman numeral representation of the integer
  """
  @spec create(count :: non_neg_integer) :: String.t
  def create(0), do: "nvilla"
  def create(5), do: "v"
  def create(_), do: "ooops"
end<commit_msg>Define better types<commit_after>defmodule Poker.Deck do
  @moduledoc """
  A standard 52 card deck.
  """

  @type rank :: 2..14
  @type suit :: :spades | :clubs | :hearts | :diamonds
  @type card :: {rank, suit}
  @type deck :: [card, ...]

  @ranks Enum.to_list(2..14)
  @suits [:spades, :clubs, :hearts, :diamonds]

  @doc """
  Creates a shuffled deck.
  """
  @spec new() :: deck
  def new() do
    for suit <- @suits, rank <- @ranks do
      {rank, suit}
    end |> Enum.shuffle()
  end

  @doc """
  Create a Roman numeral representation of the integer
  """
  @spec create(count :: non_neg_integer) :: String.t
  def create(0), do: "nvilla"
  def create(5), do: "v"
  def create(_), do: "ooops"
end
{'fraction_non_alphanumeric': 0.17098445595854922, 'fraction_numerical': 0.012583271650629163, 'mean_word_length': 3.035820895522388, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3488534', 'n_tokens_mistral': 537, 'n_tokens_neox': 507, 'n_words': 152}