mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-01-01 03:12:23 +08:00
Add additional functor example
This commit is contained in:
parent
82bd46bb1a
commit
5a5b2929b0
@ -115,5 +115,11 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// Add usage model for mixed use:
|
||||
// chai.eval("call(?, ?)", 5, "hello world"); or something
|
||||
|
||||
// add examples for and clean up usage of bootstrap stuffs
|
||||
|
||||
int x = chai.functor<int (int, int)>("fun (x, y) { return x + y; }")(5, 6);
|
||||
|
||||
log("Functor test output", boost::lexical_cast<std::string>(x));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user