#ifndef jk_FUNCTION_HPP #define jk_FUNCTION_HPP #include "commons.hpp" #include "Program.hpp" namespace jk { class Value; using value_t = std::shared_ptr; using foreign_t = std::function)>; class Function { public: explicit Function(foreign_t foreign); explicit Function(std::shared_ptr program); virtual ~Function(); std::shared_ptr program() const { return m_program; } value_t call(std::vector const& args); private: foreign_t m_foreign; std::shared_ptr m_program; }; } #endif