public static NonEmpty <ImmutableArray <A> > array <A>(A first, params A[] rest) { var b = ImmutableArray.CreateBuilder <A>(rest.Length + 1); b.Add(first); b.AddRange(rest); return(NonEmpty <ImmutableArray <A> > .__unsafeNew(b.MoveToImmutable())); }
public static NonEmpty <IEnumerable <B> > map <A, B, C>( this NonEmpty <C> ne, Func <A, B> f ) where C : IEnumerable <A> => NonEmpty <IEnumerable <B> > .__unsafeNew(ne.a.Select(f));
[PublicAPI] public static A head <A>(this NonEmpty <List <A> > ne) => ne.a[0];
[PublicAPI] public static A head <A>(this NonEmpty <A[]> ne) => ne.a[0];
[PublicAPI] public static A head <A>(this NonEmpty <ImmutableArray <A> > ne) => ne.a[0];
public static NonEmpty <ImmutableSortedSet <A> > sortedSet <A>(A a1, params A[] rest) => NonEmpty <ImmutableSortedSet <A> > .__unsafeNew(ImmutableSortedSet.Create(rest).Add(a1));
public static NonEmpty <ImmutableSortedSet <A> > sortedSet <A>(A a1) => NonEmpty <ImmutableSortedSet <A> > .__unsafeNew(ImmutableSortedSet.Create(a1));
public static NonEmpty <IEnumerable <B> > map <A, B>(this NonEmpty <A[]> ne, Func <A, B> f) => map <A, B, A[]>(ne, f);
public static NonEmpty <ImmutableArray <A> > array <A>(A a1, A a2, A a3, A a4) => NonEmpty <ImmutableArray <A> > .__unsafeNew(ImmutableArray.Create(a1, a2, a3, a4));
public static NonEmpty <ImmutableArray <A> > array <A>(A a1) => NonEmpty <ImmutableArray <A> > .__unsafeNew(ImmutableArray.Create(a1));
public static Option <NonEmpty <ImmutableSortedSet <A> > > toNonEmpty <A>(this ImmutableSortedSet <A> c) => NonEmpty <ImmutableSortedSet <A> > .__unsafeApply(c, _ => _.IsEmpty);
public static Option <NonEmpty <List <A> > > toNonEmpty <A>(this List <A> c) => NonEmpty <List <A> > .__unsafeApply(c, _ => _.isEmpty());
public static Option <NonEmpty <A[]> > toNonEmpty <A>(this A[] c) => NonEmpty <A[]> .__unsafeApply(c, _ => _.isEmpty());
public static NonEmpty <ImmutableSortedSet <A> > ToImmutableSortedSet <A>(this NonEmpty <IEnumerable <A> > ne) => NonEmpty <ImmutableSortedSet <A> > .__unsafeNew(ne.a.ToImmutableSortedSet());
public static NonEmpty <ImmutableArray <A> > ToImmutableArray <A>(this NonEmpty <IEnumerable <A> > ne) => NonEmpty <ImmutableArray <A> > .__unsafeNew(ne.a.ToImmutableArray());
public static NonEmpty <IEnumerable <B> > map <A, B>(this NonEmpty <ImmutableList <A> > ne, Func <A, B> f) => map <A, B, ImmutableList <A> >(ne, f);
public static NonEmpty <ImmutableList <A> > toImmutableList <A>(this NonEmpty <IEnumerable <A> > ne) => NonEmpty <ImmutableList <A> > .__unsafeNew(ne.a.ToImmutableList());
public static A head <A>(this NonEmpty <ImmutableList <A> > ne) => ne.a[0];