make types::Function callable

This commit is contained in:
numzero 2025-04-19 13:45:04 +03:00
parent d9b86f430f
commit 995122f1e0

View File

@ -102,3 +102,9 @@ impl Hash for Function {
std::ptr::hash(self.inner.as_ref(), state) std::ptr::hash(self.inner.as_ref(), state)
} }
} }
impl Function {
pub fn call(&self, args: &[Value]) -> Value {
(self.inner)(args)
}
}