aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
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;
+}