using System; using System.Linq; public static class Piping { public static U Pipe(this T x, Func f) => f(x); public static U Pipe(this ValueTuple x, Func f) => f(x.Item1, x.Item2); public static void Pipe(this T x, Action f) => f(x); public static T Do(this T x, Action f) { f(x); return x; } }