Skip to content

Commit 8bc5c93

Browse files
committed
Add PersistentVector arity-2 fn invoke, giving it the same behavior as PersistentMap.
1 parent 94842f1 commit 8bc5c93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jvm/clojure/lang/APersistentVector.java

+4
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ public Object invoke(Object arg1) {
261261
throw new IllegalArgumentException("Key must be integer");
262262
}
263263

264+
public Object invoke(Object arg1, Object notFound) {
265+
return valAt(arg1, notFound);
266+
}
267+
264268
public Iterator iterator(){
265269
//todo - something more efficient
266270
return new Iterator(){

0 commit comments

Comments
 (0)