[CLJ-1466] clojure.core/bean should implement Iterable Created: 16/Jul/14 Updated: 03/Aug/14
|Patch:||Code and Test|
The changes in Clojure 1.6 hashing revealed that `bean` does not return a map that implements Iterable:
Patch adds `iterator` method to clojure.core/bean.
|Comment by Alex Miller [ 16/Jul/14 10:22 AM ]|
Interestingly, into does not help b/c into uses reduce, which internally uses the iterator too.
|Comment by Alex Miller [ 16/Jul/14 11:01 AM ]|
APersistentMap implements Iterable and expects subclasses to fulfill that contract. The bean proxy does not. Instead of changing APersistentMap, why not add:
to the bean proxy definition?
|Comment by Ambrose Bonnaire-Sergeant [ 16/Jul/14 11:19 AM ]|
It seemed like an oversight that APersistentMap lacked a default iterator method.
That said, I haven't used OO inheritance for 4 years. Should I change the patch?
|Comment by Ambrose Bonnaire-Sergeant [ 16/Jul/14 11:47 AM ]|
Added new patch that just adds iterator to bean.