public static Func <CmdResult <T>, CmdResult <V> > DoubleMap <T, V>(this Func <T, V> success, Func <string, string> failure)
 {
     return(x =>
     {
         if (x.IsFailure)
         {
             return CmdResult.Fail <V>(failure(x.Message));
         }
         return CmdResult.Success(success(x.Data));
     });
 }
 public static Func <T, CmdResult <V> > Switch <T, V>(this Func <T, V> f) => x => CmdResult.Success(f(x));