-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestneeds explorationNeed to find more specific examples and narrow down the issueNeed to find more specific examples and narrow down the issue
Description
Babel specs for filter, map, and possibly other functions allow the first argument to be any to allow the case of an empty sequence (legal in Clojure):
(filter 5 [])
This returns an empty sequence.
However, it leads to a ClassCastException error, not a spec error, on the first argument not being a function when the sequence is not empty, for example:
(filter 5 [1])
We need a special spec case for an empty sequence since otherwise error messages for a very common error are not sufficiently descriptive.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestneeds explorationNeed to find more specific examples and narrow down the issueNeed to find more specific examples and narrow down the issue