Add tests for map#889
Conversation
| (is (and (p/lazy-seq? try-nil) (empty? try-nil))) | ||
| (is (and (p/lazy-seq? try-empty-list) (empty? try-empty-list)))) |
There was a problem hiding this comment.
I think checking lazy-seq? here is redundant but won't block on it
There was a problem hiding this comment.
This one I think is valid. I want to ensure that even with an empty or nil list, the return value of map is still a lazy seq. That is, no shortcuts being taken where the implementation just returns the empty list or nil.
E-A-Griffin
left a comment
There was a problem hiding this comment.
Left some suggestions
There was a problem hiding this comment.
Pull request overview
This PR adds a new core test namespace to cover clojure.core/map behavior across arities and common edge cases, addressing issue #351.
Changes:
- Adds
test-mapcoverage formaparities 1 (transducer) through 5+ (multiple input seqs). - Adds checks for laziness/realization, termination at shortest input, and behavior on
nil/empty inputs. - Adds negative-case assertions for non-seqable inputs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I also added a test case where some of the collections are infinite |
|
Added lots of infinite ranges. Did not convert to |
Closes #351