Uploaded image for project: 'Clojure'
  1. CLJ-1896

Support transducers in vec and set fns

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: Release 1.8
    • Fix versions: None
    • Labels:
    • Approval:
      Triaged

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexmiller Alex Miller
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: