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