Closed elenam closed 8 years ago
(reduce 1 [1 2 3]); ; - :two-case fails at ifn? ; - :three-case fails at length3? (reduce 1) ; - :two-case fails at length2? ; - :three-case fails at length3? (reduce 1 2 3 3) ; - :two-case fails at length2? ; - :three-case fails at length3? (reduce + 0 [] 1) ; - :two-case fails at length2? ; - :three-case fails at length3? (reduce 1 2 3) ; - :two-case fails at length2? ; - :three-case fails at ifn? (reduce + 3) ; - :two-case fails at seqable? ; - :three-case fails at length3? (reduce + 2 2) ; - :two-case fails at length2? ; - :three-case fails at seqable?
The current spec
gives an arity error, not a type error on
(reduce + :not-a-collection)
:This is because when the condition for the second argument fails, it expects a third argument that would've made spec pass.
repeat
andrepeatedly
have the same issue.