Created
July 24, 2015 13:48
-
-
Save retran/c8ad3b385ca3c19437b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace clojure_test | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var eval = clojure.lang.RT.var("clojure.core", "load-string"); | |
eval.invoke("(def my-func (fn [a b] (+ a b)))"); | |
var result1 = eval.invoke("(my-func 1 2)"); | |
Console.WriteLine(result1); | |
eval.invoke("(def my-func (fn [a b] (- a b)))"); | |
var result2 = eval.invoke("(my-func 1 2)"); | |
Console.WriteLine(result2); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment