Ejemplo n.º 1
0
 public T Single()
 {
     if (Rest.Any())
     {
         throw new Exception("Enumerable1 assumption for Single() failed - REST element was non-empty");
     }
     return(First);
 }
Ejemplo n.º 2
0
 public T Single()
 {
     if (Rest.Any())
     {
         throw new Exception("Array1 assumption for Single() failed - the length was actually " + Length);
     }
     return(First);
 }
Ejemplo n.º 3
0
 public bool Any(Func <T, bool> f) => f(First) || Rest.Any(f);
Ejemplo n.º 4
0
 public T Last() => Rest.Any() ? Rest.Last() : First;