|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Diggins.Jigsaw
{
class SchemeTests
{
public static void Test(string input, params object[] args)
{
var r = SchemeExpressionCompiler.CompileLambda(input);
r.DynamicInvoke(args);
}
public static void Tests()
{
Test("(lambda())");
Test("(lambda () )");
Test("(lambda ( ) )");
Test("(lambda (a) )");
Test("(lambda (a) a)");
Test("(lambda (a b) a)");
Test("(lambda (a b) 12)");
Test("(lambda (a b) (add a b))");
Test("(lambda (a b) (add a b))", 3, 4);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.