aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-01-09 19:26:24 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-01-09 19:26:24 +0300
commitff592daf2d90b922f82e65f648caf27381f89590 (patch)
treea7d9d7bfb8a53ad38876cf4f0241a3ab54b39e2a /examples
parentd0b081afd74ef291f36db208eaf9fcd9c109b163 (diff)
downloadcsx-ff592daf2d90b922f82e65f648caf27381f89590.tar
csx-ff592daf2d90b922f82e65f648caf27381f89590.tar.xz
csx-ff592daf2d90b922f82e65f648caf27381f89590.zip
Some garbage collection added.
Diffstat (limited to 'examples')
-rw-r--r--examples/add.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/add.c b/examples/add.c
new file mode 100644
index 0000000..1c43c9b
--- /dev/null
+++ b/examples/add.c
@@ -0,0 +1,17 @@
+#include <csx.h>
+#include <stdio.h>
+
+
+static csx_list_fn *l;
+static csx_int_fn *i;
+
+
+int main()
+{
+ l = csx_list;
+ i = csx_int;
+ char *plus = csx_name("+");
+ printf("%d\n", *(int *)csx_run(l(plus, i(37), i(73), 0)));
+ csx_free();
+ return 0;
+}