The following site shows an sample of embedding chibi scheme into a c program:
http://synthcode.com/scheme/chibi/
/* construct a Scheme expression to eval */
obj1 = sexp_intern(ctx, "my-procedure", -1);
obj2 = sexp_cons(ctx, obj1, SEXP_NULL);
sexp_eval(ctx, obj2, NULL);
That snippet shows how to call a procedure. Now, I'm trying to call a procedure with an argument, but I'm not getting it to work.
I'm both new at scheme and at chibi. This is how I thought it would be:
obj1 = sexp_intern(ctx, "my-procedure", -1);
obj2 = sexp_make_fixnum(3);
tmp = sexp_cons(ctx, obj1, obj2);
sym = sexp_cons(ctx, tmp, SEXP_NULL);
res = sexp_eval(ctx, sym, NULL);
I get this error back from chibi: dotted list in source
How can I call a procedure with multiple params?
This did it: