We're updating the issue view to help you get more done. 

`reductions should respect `reduced

Description

This returns 16:

1 2 3 4 5 6 (reduce (fn [acc x] (let [x' (* x x)] (if (> x' 10) (reduced x') x'))) (range))

But replacing reduce with reductions will never terminate:

1 2 3 4 5 6 (reductions (fn [acc x] (let [x' (* x x)] (if (> x' 10) (reduced x') x'))) (range))

Cause: reductions ignores clojure.lang.Reduced, it never tests for reduced?

Patch: CLJ-1181-v002.patch

Screened by: Alex Miller

Environment

None

Status

Assignee

Unassigned

Reporter

Brandon Bloom

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Priority

Critical