<commit_before>#ifndef function_group_hh_INCLUDED
#define function_group_hh_INCLUDED

#include "exception.hh"
#include "id_map.hh"
#include "string.hh"

namespace Kakoune
{

template<typename... Args>
class FunctionGroup
{
public:
    using Function = std::function<void (Args...)>;
    using FunctionAndId = std::pair<String, std::function<void (Args...)>>;

    void operator()(Args&&... args)
    {
        for (auto& func : m_functions)
           func.second(std::forward<Args>(args)...);
    }

    void append(FunctionAndId&& function)
    {
        if (m_functions.contains(function.first))
            throw runtime_error("duplicate id: " + function.first);

        m_functions.append(std::forward<FunctionAndId>(function));
    }
    void remove(const String& id)
    {<commit_msg>FunctionGroup: fix incorrect parameter for operator()<commit_after>#ifndef function_group_hh_INCLUDED
#define function_group_hh_INCLUDED

#include "exception.hh"
#include "id_map.hh"
#include "string.hh"

namespace Kakoune
{

template<typename... Args>
class FunctionGroup
{
public:
    using Function = std::function<void (Args...)>;
    using FunctionAndId = std::pair<String, std::function<void (Args...)>>;

    void operator()(Args... args)
    {
        for (auto& func : m_functions)
           func.second(std::forward<Args>(args)...);
    }

    void append(FunctionAndId&& function)
    {
        if (m_functions.contains(function.first))
            throw runtime_error("duplicate id: " + function.first);

        m_functions.append(std::forward<FunctionAndId>(function));
    }
    void remove(const String& id)
    {
{'fraction_non_alphanumeric': 0.14118372379778052, 'fraction_numerical': 0.0, 'mean_word_length': 3.558988764044944, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6472980', 'n_tokens_mistral': 504, 'n_tokens_neox': 497, 'n_words': 101}