public static IImmutableSeq <T> Of <T>(IEnumerable <T> values) { return(values is IImmutableSeq <T> of ? of : values is IMutableSeq <T> ?((IMutableSeq <T>)values).ToImmutableSeq() : MutableSeq.Of(values).ToImmutableSeq()); }
public static IImmutableSeq <char> ToImmutableSeq(string chars) { var seq = MutableSeq.OfLength <char>(chars.Length); for (var i = 0; i < chars.Length; ++i) { seq[i] = chars[i]; } return(seq.ToImmutableSeq()); }
public static IImmutableSeq <T> Of <T>(params T[] values) { return(values.Length == 0 ? Empty <T>() : MutableSeq.Of(values).ToImmutableSeq()); }
public static IMutableSeq <T> ToMutableSeq <T>(this IEnumerable <T> source) { return(MutableSeq.Of(source)); }