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

Transducing an eduction finishes twice

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: Release 1.7
    • Fix versions: Release 1.7
    • Labels:
    • Environment:

      1.7.0-alpha4

    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      > (transduce (map identity)
                   (fn
                     ([s] (println "Finishing") s)
                     ([s i] s))
                   nil
                   (eduction (map identity) []))
      Finishing
      Finishing
      nil
      

      Cause: transduce passes (xf f) into .reduce of Eduction, which calls transduce, causing completing xf to be called more than once.

      Proposed: Eduction reduce should use (completing f) instead of f to isolate completion of inner xf from outer xf.

      Patch: CLJ-1606-5.patch

      Screened by: Alex Miller

        Attachments

        1. CLJ-1606.patch
          2 kB
        2. CLJ-1606-2.patch
          2 kB
        3. CLJ-1606-3.patch
          2 kB
        4. CLJ-1606-4.patch
          2 kB
        5. CLJ-1606-5.patch
          2 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bendlas Herwig Hochleitner
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: