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

PersistentVector implements IReduce but the no init arity throws

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: Release 1.7
    • Fix versions: Release 1.7
    • Labels:
      None
    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      The reduce arity of IReduce in PersistentVector is implemented as: "throw new UnsupportedOperationException()".

      After the CLJ-1572 Closed patch is applied the following code will throw:

      (reduce + [1 2])

      Approach taken: Implement reduce(f) in PersistentVector.

      Alternative: An alternate would be to change PersistentVector from IReduce to IReduceInit and remove the reduce without init function. In this case, reducing a vector would fall back to seqs.

      Patch: 0001-CLJ-1619-Implement-no-init-arity-of-reduce-for-Persi.patch

      Screened by: Stu

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bronsa Nicola Mometto
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: