public Y foldl <Y>(Func <Y, X, Y> f, Y y0, Lst <X> container) => Lst.foldl(f, y0, container);
public Y foldr <Y>(Func <X, Y, Y> f, Y y0, Lst <X> container) => Lst.foldr(f, y0, container);
public Lst <Y> apply(Lst <Func <X, Y> > cf, Lst <X> cx) => Lst.apply(cf, cx);
public static Lst <Y> Select <X, Y>(this Lst <X> list, Func <X, Y> selector) => Lst.make(from x in list.Stream() select selector(x));
public bool neq(Lst <X> l1, Lst <X> l2) => not(eq(l1, l2));
public Lst <X> alt(Lst <X> l1, Lst <X> l2) => Lst.concat(l1, l2);
public bool eq(Lst <X> x1, Lst <X> x2) => x1 == x2;
public Func <Lst <X>, Lst <Y> > fmap(Func <X, Y> f) => Lst.Functor <X, Y>().fmap(f);
public Lst <Y> apply(Lst <Func <X, Y> > lf, Lst <X> lx) => Lst.apply(lf, lx);
public Lst <X> combine(Lst <X> a1, Lst <X> a2) => a1 + a2;
public Lst <Y> bind(Lst <X> list, Func <X, Lst <Y> > f) => Lst.bind(list, f);
public static Lst <X> Where <X>(this Lst <X> list, Func <X, bool> predicate) => Lst.make(from x in list.Stream() where predicate(x) select x);
public static Lst <Z> SelectMany <X, Y, Z>(this Lst <X> list, Func <X, Lst <Y> > lift, Func <X, Y, Z> project) => Lst.make(from x in list.Stream() from y in lift(x).Stream() select project(x, y));
public Lst <Y> traverse(Func <X, Lst <Y> > f, Lst <X> cx) => Lst.traverse(f, cx);
public Lst <X> pure(X x) => Lst.singleton(x);
public Func <Lst <X>, Lst <Y> > extend(Func <Lst <X>, Y> f) => lx => from lxt in Lst.tails(lx) where not(lxt.IsEmpty) let y = f(lxt) select y;
public Lst <Y> bind(Lst <X> f, Func <X, Lst <Y> > g) => Lst.bind(f, g);
public bool eq(Lst <X> l1, Lst <X> l2) => Lst.eq(l1, l2);
public Lst <X> alt(Lst <X> l1, Lst <X> l2) => LstAlt <X> .instance.alt(l1, l2);
public Func <Lst <X>, Lst <Y> > fmap(Func <X, Y> f) => Lst.fmap(f);
public Func <Lst <X>, Lst <Y> > imap(Func <X, Y> f, Func <Y, X> g) => lx => Lst.imap(f, g, lx);
public Func <Lst <X>, Lst <X> > fmap(Func <X, X> f) => Lst.fmap(f);
public X fold(IMonoid <X> m, Lst <X> container) => Foldable <X, Lst <X> > .instance.fold(m, container);
/// <summary> /// Creates a list from a stream /// </summary> /// <typeparam name="X">The item type</typeparam> /// <param name="source">The source stream</param> /// <returns></returns> public static Lst <X> AsList <X>(this IEnumerable <X> source) => Lst.make(source);
/// <summary> /// Constructs a weakly-typed frame, if possible /// </summary> /// <param name="coltypes">The frame column types</param> /// <param name="data">Conforming item arrays</param> /// <returns></returns> public static Option <IDataFrame> make(Lst <Type> coltypes, Lst <object[]> data) => from order in some(coltypes.Count - 1) from frameTypeDef in FrameTypeDef(order) let frameType = frameTypeDef.MakeGenericType(coltypes.AsArray()) let frame = Activator.CreateInstance(frameType) as IDataFrameRoot select frame.Construct(data);