13#if !defined(VITA_FUNCTION_H)
14#define VITA_FUNCTION_H
38 function(
const std::string &, std::size_t);
44 [[nodiscard]]
virtual std::string
display(
format = c_format)
const;
46 [[nodiscard]]
unsigned arity()
const final;
48 [[nodiscard]]
bool is_valid()
const override;
61 Expects(argt_.size());
62 return static_cast<unsigned>(argt_.size());
104 return static_cast<const function *
>(s);
A symbol with arity() > 0.
static const function * cast(const symbol *)
This is a short cut function.
category_t arg_category(std::size_t) const
function(const std::string &, category_t, cvect)
virtual std::string display(format=c_format) const
unsigned arity() const final
virtual bool associative() const
Is the symbol subject to the associative law of arithmetic?
bool is_valid() const override
Together functions and terminals are referred to as symbols.
format
Symbol rendering format.
The main namespace for the project.
std::size_t category_t
A category provide operations which supplement or supersede those of the domain but which are restric...