<commit_before>This is a tiny header file that allows you to use all objects that would otherwise be usable with `std::function` in a curried manner, like in functional languages.


Dependencies
============

A sane compiler (with C++14 support).


Example
=======

    // To build: g++ -std=c++14 example.cpp -o example

    #include <iostream>
    #include "curry.hpp"

    int add_then_sub(int x, int y, int z) {
        return x + y - z;
    }

    // auto return type to save lots of typing
    // this is also an example of eta reduction
    auto step_one() {
        // first template parameter is the return type, the others are arguments' types
        return curry(add_then_sub)(5);
    }

    int main(int argc, char* argv[]) {
        std::cout << uncurry(step_one())(4, 3) << "\n";

        return 0;
    }

Output:<commit_msg>Updated readme.<commit_after>This is a tiny header file that allows you to use all objects that would otherwise be usable with `std::function` in a curried manner, like in functional languages.


Dependencies
============

A sane compiler (with C++14 support). Tested on MinGW-w64 with g++ 4.9.1. Should work fine with clang, probably doesn't with MSVC.


Example
=======

    // To build: g++ -std=c++14 example.cpp -o example

    #include <iostream>
    #include "curry.hpp"

    int add_then_sub(int x, int y, int z) {
        return x + y - z;
    }

    // auto return type to save lots of typing
    // this is also an example of eta reduction
    auto step_one() {
        // first template parameter is the return type, the others are arguments' types
        return curry(add_then_sub)(5);
    }

    int main(int argc, char* argv[]) {
        std::cout << uncurry(step_one())(4, 3) << "\n";

        return 0;
    }

Output:
{'fraction_non_alphanumeric': 0.12281690140845071, 'fraction_numerical': 0.011830985915492958, 'mean_word_length': 2.6923076923076925, 'pattern_counts': {'":': 0, '<': 13, '<?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': '153721', 'n_tokens_mistral': 564, 'n_tokens_neox': 525, 'n_words': 219}