public SwitchD(G.IEnumerable <Case <X, Y> > Cases, Func <X, Y> @default) { this.Cases = Lst.make(Cases); this.Default = @default; }
public Lookup(IndexFile ix, G.IEnumerable <Value> values) { Values = values; Ix = ix; }
public Expression(G.IEnumerable <IToken> Tokens) { this.Tokens = Lst.make(Tokens); this.IsEmpty = this.Tokens.Count == 0; }
/// <summary> /// Constructs a <see cref="Lst{X}"/> by concatenating a stream and optional array /// </summary> /// <typeparam name="X">The list item type</typeparam> /// <param name="items">The items to include in the list</param> /// <param name="more">Additional items to append</param> /// <returns></returns> public static Lst <X> list <X>(G.IEnumerable <X> items, params X[] more) => Lst.make(items.Concat(more));
/// <summary> /// Constructs a set from a stream /// </summary> /// <typeparam name="X">The item type</typeparam> /// <param name="items">The input enumerable</param> /// <returns></returns> public static Set <X> make <X>(G.IEnumerable <X> items) => make(Seq.make(items));