Welcome! Please see the About page for a little more info on how this works.

+5 votes
in Transducers by

Rather than
`(into [] (map inc) [1 2 3])`
{{vec}} (and {{set}}) could support the transducer directly:

(vec (map inc) [1 2 3]) (set (map inc) #{1 2 3})

Depending how far we wanted to take this, the implementation could be somewhat clever for vec in building the initial set of results in an array and then creating the vector with it directly as is already done in some other cases.

1 Answer

+1 vote
Reference: https://clojure.atlassian.net/browse/CLJ-1896 (reported by alexmiller)