private create1 ( ICollection items ) : |
||
items | ICollection | |
Résultat |
static public IPersistentVector create(object obj) { IReduceInit ri = obj as IReduceInit; if (ri != null) { return(PersistentVector.create(ri)); } ISeq iseq = obj as ISeq; if (iseq != null) { return(PersistentVector.create(RT.seq(obj))); } IEnumerable ie = obj as IEnumerable; if (ie != null) { return(PersistentVector.create1(ie)); } return(createOwning(RT.toArray(obj))); }
static public IPersistentVector create(object obj) { //if ((obj is Counted || RT.SupportsRandomAccess(obj)) // && fcount(obj) <= Tuple.MAX_SIZE) // return Tuple.createFromColl(obj); IReduceInit ri = obj as IReduceInit; if (ri != null) { return(PersistentVector.create(ri)); } ISeq iseq = obj as ISeq; if (iseq != null) { return(PersistentVector.create(RT.seq(obj))); } IEnumerable ie = obj as IEnumerable; if (ie != null) { return(PersistentVector.create1(ie)); } return(createOwning(RT.toArray(obj))); }