This commit is contained in:
2020-02-17 11:22:31 +01:00
commit f03f085966
4 changed files with 73 additions and 0 deletions

11
examples/simple.carp Normal file
View File

@@ -0,0 +1,11 @@
(load "main.carp")
(inline-c "long x() { return (1<<30)+12; }")
(register x (Fn [] Long))
(inline-c "#include <stdio.h>
long y() { puts(\"inside c!\"); return 42; }")
(register y (Fn [] Long))
(defn main [] (println* (+ (x) (y))))