This code sample is not able to be compiled. Any work arounds out there?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
n
Here's another workaround: don't use Func
, use a good old delegate type.
public delegate dynamic Church(dynamic x, dynamic y);
class Program {
static void Main(string[] args) {
Church True = (a, b) => a;
Church False = (a, b) => b;
Func And = (x, y) => x(y(True, False), False);
}
}
This also has the benefit, that Church is defined everywhere, and not just as a per-file using alias.