public Sentinel(StrI1 <T> str, T sentinel) { _str = str; _sentinel = sentinel; _enumerator = _str.ToEnumerable().GetEnumerator(); }
static public bool Contain <T, TEq>(this StrI1 <T> str, T x, TEq eq) where TEq : IEqualityComparer <T> { if (str is SansI) { return(false); } var seeded = str as str.SeededI_forGeneric <T>; return(eq.Equals(seeded.seed, x) || seeded.tail.Contain(x, eq)); }
static public bool IsDistinct <T, TEq>(this StrI1 <T> str, TEq eq) where TEq : IEqualityComparer <T> { if (str is str.SansI) { return(true); } var seeded = (str as str.SeededI_forGeneric <T>); return(seeded.tail.IsDistinct(eq) && seeded.tail.Contain(seeded.seed, eq)); }
static public bool IsDistinct_eqDefault <T, TEq>(this StrI1 <T> str) where TEq : IEqualityComparer <T>, new() { return(IsDistinct(str, SingletonByDefault <TEq> .Instance)); }
static public Enumerable1 <T> ToEnumerable <T>(this StrI1 <T> str) { return(new Enumerable1 <T>(str)); }
public Enumerable1(StrI1 <T> str) { _str = str; }
public Started_tailStr(T seed, StrI1 <T> tail) : base(seed, tail) { }
static public bool NotContain_eqDefault <T, TEq>(this StrI1 <T> str, T x) where TEq : IEqualityComparer <T>, new() { return(!str.Contain_eqDefault <T, TEq>(x)); }
static public bool NotContain <T, TEq>(this StrI1 <T> str, T x, TEq eq) where TEq : IEqualityComparer <T> { return(!str.Contain(x, eq)); }
static public bool Contain_eqDefault <T, TEq>(this StrI1 <T> str, T x) where TEq : IEqualityComparer <T>, new() { return(str.Contain(x, SingletonByDefault <TEq> .Instance)); }