Is there a way to use operators as functions without declaring them manually?
Func<bool, bool> not = x => !x;
Similar to (+)
/(-)
in Haskell. Would be handy in various LINQ scenarios involving conditional query construction. Maybe some C# (4.0+) trick I don't know about.
Edit: here is a sample to clarify what I mean:
int MyWhere(Func<bool, bool, bool> cond) {}
a usual call would be:
MyWhere((x,y) => x && y)
a cool call would be (assuming Haskell style):
MyWhere((&&))