Functions on functions for C#