MCPcopy Index your code
hub / github.com/clojure/clojure / assocN

Method assocN

src/jvm/clojure/lang/RT.java:1015–1028  ·  view source on GitHub ↗
(int n, Object val, Object coll)

Source from the content-addressed store, hash-verified

1013}
1014
1015static public Object assocN(int n, Object val, Object coll){
1016 if(coll == null)
1017 return null;
1018 else if(coll instanceof IPersistentVector)
1019 return ((IPersistentVector) coll).assocN(n, val);
1020 else if(coll instanceof Object[]) {
1021 //hmm... this is not persistent
1022 Object[] array = ((Object[]) coll);
1023 array[n] = val;
1024 return array;
1025 }
1026 else
1027 return null;
1028}
1029
1030static boolean hasTag(Object o, Object tag){
1031 return Util.equals(tag, RT.get(RT.meta(o), TAG_KEY));

Callers

nothing calls this directly

Calls 1

assocNMethod · 0.65

Tested by

no test coverage detected