File tree 3 files changed +19
-6
lines changed
3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 6515
6515
([xform f coll] (transduce xform f (f ) coll))
6516
6516
([xform f init coll]
6517
6517
(let [f (xform f)
6518
- ret (if (instance? clojure.lang.IReduce coll)
6519
- (.reduce ^clojure.lang.IReduce coll f init)
6518
+ ret (if (instance? clojure.lang.IReduceInit coll)
6519
+ (.reduce ^clojure.lang.IReduceInit coll f init)
6520
6520
(clojure.core.protocols/coll-reduce coll f init))]
6521
6521
(f ret))))
6522
6522
7264
7264
clojure.lang.Seqable
7265
7265
(seq [_] (seq (sequence xform coll)))
7266
7266
7267
- clojure.lang.IReduce
7267
+ clojure.lang.IReduceInit
7268
7268
(reduce [_ f init] (transduce xform f init coll))
7269
7269
7270
7270
clojure.lang.Sequential )
Original file line number Diff line number Diff line change 12
12
13
13
package clojure .lang ;
14
14
15
- public interface IReduce {
15
+ public interface IReduce extends IReduceInit {
16
16
Object reduce (IFn f ) ;
17
-
18
- Object reduce (IFn f , Object start ) ;
19
17
}
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) Rich Hickey. All rights reserved.
3
+ * The use and distribution terms for this software are covered by the
4
+ * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5
+ * which can be found in the file epl-v10.html at the root of this distribution.
6
+ * By using this software in any fashion, you are agreeing to be bound by
7
+ * the terms of this license.
8
+ * You must not remove this notice, or any other, from this software.
9
+ **/
10
+
11
+ package clojure .lang ;
12
+
13
+ public interface IReduceInit {
14
+ Object reduce (IFn f , Object start ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments