<commit_before>defmodule Protocols do
  use Koans

  @intro "Protocols"

  defprotocol School, do: def enrol(person)

  defimpl School, for: Any do
    def enrol(_) do
      "Pupil enrolled at school"
    end
  end

  defmodule Student do
    @derive School
    defstruct name: ""
  end

  defmodule Musician, do: defstruct name: "", instrument: ""
  defmodule Dancer,  do: defstruct name: "", dance_style: ""
  defmodule Baker, do: defstruct name: ""

  defimpl School, for: Musician do
    def enrol(musician) do
      "#{musician.name} signed up for #{musician.instrument}"
    end
  end

  defimpl School, for: Dancer do
    def enrol(dancer), do: "#{dancer.name} enrolled for #{dancer.dance_style}"
  end<commit_msg>Adds an introduction<commit_after>defmodule Protocols do
  use Koans

  @intro "Wan't to follow the rules? Adhere to the protocol!"

  defprotocol School, do: def enrol(person)

  defimpl School, for: Any do
    def enrol(_) do
      "Pupil enrolled at school"
    end
  end

  defmodule Student do
    @derive School
    defstruct name: ""
  end

  defmodule Musician, do: defstruct name: "", instrument: ""
  defmodule Dancer,  do: defstruct name: "", dance_style: ""
  defmodule Baker, do: defstruct name: ""

  defimpl School, for: Musician do
    def enrol(musician) do
      "#{musician.name} signed up for #{musician.instrument}"
    end
  end

  defimpl School, for: Dancer do
    def enrol(dancer), do: "#{dancer.name} enrolled for #{dancer.dance_style}"
  end
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.0, 'mean_word_length': 3.398230088495575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7428573', 'n_tokens_mistral': 504, 'n_tokens_neox': 478, 'n_words': 167}