Replies: 3 comments 5 replies
-
Another interesting case is So if we know at compile-time that reduce is being passed Edit: that's not the precise reason, but regardless |
Beta Was this translation helpful? Give feedback.
-
@vemv I think in these cases we could relax this linter:
|
Beta Was this translation helpful? Give feedback.
-
One more thought: even when a collection has more than two elements, it isn't always safe to use with reduce, since sometimes the init value is a map or so, and then args are other types, like numbers. |
Beta Was this translation helpful? Give feedback.
-
(reduce into [a b c])
does not seem possibly subject to the pitfall that is guarded by:reduce-without-init
.My reasoning being that
[a b c]
is known at compile-time to be a coll of> 2
elements.WDYT?
Beta Was this translation helpful? Give feedback.
All reactions