[CLJ-1098] Extend CollFold and IKVReduce to nil Created: 31/Oct/12 Updated: 01/Mar/13 Resolved: 25/Jan/13
|Fix Version/s:||Release 1.5|
|Patch:||Code and Test|
Currently, reduce-kv and fold throw when used on nil, because their respective protocols don't extend to nil. This seems strange, since Clojure tends to handle nils gracefully where possible, especially in places where collections are expected.
|Comment by Herwig Hochleitner [ 31/Oct/12 8:44 PM ]|
Attached patch with tests
|Comment by Andy Fingerhut [ 14/Jan/13 11:04 AM ]|
Another discussion thread: https://groups.google.com/forum/?fromgroups=#!topic/clojure/xPDDybYGvmc