Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dimitris-papadimitriou-chr/3aacd57d441c3fd777f2cd96a7b1c09f to your computer and use it in GitHub Desktop.
Save dimitris-papadimitriou-chr/3aacd57d441c3fd777f2cd96a7b1c09f to your computer and use it in GitHub Desktop.
public delegate Task<R> Operation<T, R>(T t);
public static partial class FuntionalExtensions
{
public static Operation<T, R> AddDebugLogging<T, R>(this Operation<T, R> @this) =>
(T t) =>
{
var result = @this(t);
Debug.WriteLine(result);
return result;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment