<commit_before>//
//  yas_version.cpp
//

#include <sstream>
#include "yas_each_index.h"
#include "yas_stl_utils.h"
#include "yas_version.h"

using namespace yas;

namespace yas {
static std::vector<int> to_numbers(std::string str) {
    std::vector<int> vec;
    std::istringstream stream(replaced(std::move(str), ".", " "));
    for (int i; stream >> i;) {
        vec.push_back(i);
    }
    return vec;
}

enum class comparison_result {
    equal,
    ascending,
    descending,
};

static comparison_result compare(version const &lhs, version const &rhs) {
    auto &lhs_numbers = lhs.numbers();
    auto &rhs_numbers = rhs.numbers();
    auto lhs_size = lhs_numbers.size();
    auto rhs_size = rhs_numbers.size();
    auto max_size = std::max(lhs_size, rhs_size);

    for (auto &idx : each_index<size_t>(max_size)) {<commit_msg>use make_each in version<commit_after>//
//  yas_version.cpp
//

#include <sstream>
#include "yas_each_index.h"
#include "yas_stl_utils.h"
#include "yas_version.h"

using namespace yas;

namespace yas {
static std::vector<int> to_numbers(std::string str) {
    std::vector<int> vec;
    std::istringstream stream(replaced(std::move(str), ".", " "));
    for (int i; stream >> i;) {
        vec.push_back(i);
    }
    return vec;
}

enum class comparison_result {
    equal,
    ascending,
    descending,
};

static comparison_result compare(version const &lhs, version const &rhs) {
    auto &lhs_numbers = lhs.numbers();
    auto &rhs_numbers = rhs.numbers();
    auto lhs_size = lhs_numbers.size();
    auto rhs_size = rhs_numbers.size();
    auto max_size = std::max(lhs_size, rhs_size);

    for (auto &idx : make_each(max_size)) {
{'fraction_non_alphanumeric': 0.145933014354067, 'fraction_numerical': 0.0, 'mean_word_length': 3.807471264367816, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, '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': '4194717', 'n_tokens_mistral': 624, 'n_tokens_neox': 609, 'n_words': 133}