Beispiel #1
0
 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());
 }
Beispiel #2
0
 public static IImmutableSeq <T> Of <T>(params T[] values)
 {
     return(values.Length == 0 ? Empty <T>() : MutableSeq.Of(values).ToImmutableSeq());
 }
Beispiel #3
0
 public static IMutableSeq <T> ToMutableSeq <T>(this IEnumerable <T> source)
 {
     return(MutableSeq.Of(source));
 }