<commit_before>#pragma once

namespace rc {
namespace state {
namespace detail {

template <typename Cmd>
void Commands<Cmd>::apply(State &state) const {
  for (const auto &command : commands) {
    command->apply(state);
  }
}

template <typename Cmd>
void Commands<Cmd>::run(const State &state, Sut &sut) const {
  State currentState = state;
  for (const auto &command : commands) {
    auto preState = currentState;
    // We need to apply first so we trigger any precondition assertions
    // before running
    command->apply(currentState);
    command->run(preState, sut);
  }
}

template <typename Cmd>
void Commands<Cmd>::show(std::ostream &os) const {
  for (const auto &command : commands) {
    command->show(os);
    os << std::endl;
  }
}

} // namespace detail
} // namespace state

template <typename Cmd>
struct ShowType<rc::state::detail::Commands<Cmd>> {
  static void showType(std::ostream &os) {
    os << "Commands<";
    ::rc::detail::showType<Cmd>(os);
    os << ">";
  }
};

} // namespace rc<commit_msg>Add showValue overload for Commands that apparently is needed sometimes<commit_after>#pragma once

namespace rc {
namespace state {
namespace detail {

template <typename Cmd>
void Commands<Cmd>::apply(State &state) const {
  for (const auto &command : commands) {
    command->apply(state);
  }
}

template <typename Cmd>
void Commands<Cmd>::run(const State &state, Sut &sut) const {
  State currentState = state;
  for (const auto &command : commands) {
    auto preState = currentState;
    // We need to apply first so we trigger any precondition assertions
    // before running
    command->apply(currentState);
    command->run(preState, sut);
  }
}

template <typename Cmd>
void Commands<Cmd>::show(std::ostream &os) const {
  for (const auto &command : commands) {
    command->show(os);
    os << std::endl;
  }
}

template <typename Cmd>
void showValue(const Commands<Cmd> &command, std::ostream &os) {
  command.show(os);
}

} // namespace detail
} // namespace state

template <typename Cmd>
struct ShowType<rc::state::detail::Commands<Cmd>> {
  static void showType(std::ostream &os) {
    os << "Commands<";
    ::rc::detail::showType<Cmd>(os);
    os << ">";
  }
};

} // namespace rc
{'fraction_non_alphanumeric': 0.142152466367713, 'fraction_numerical': 0.0, 'mean_word_length': 4.002242152466367, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 35, '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': '3423978', 'n_tokens_mistral': 700, 'n_tokens_neox': 698, 'n_words': 202}