Share your thoughts in the 2021 Clojure Community Survey!

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

0 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

0 votes
Reference: (reported by alexmiller)