Skip to content

Commit 5787cd0

Browse files
committed
Improve naming of fn->JavaFunction functions
1 parent 90527e1 commit 5787cd0

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/manifold/utils.clj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,19 @@
136136

137137
;;;
138138

139-
(defn fn->Function [function]
139+
(defn fn->Function [f]
140140
(reify java.util.function.Function
141-
(apply [_ x] (function x))))
141+
(apply [_ x] (f x))))
142142

143-
(defn fn->Consumer [function]
143+
(defn fn->Consumer [f]
144144
(reify java.util.function.Consumer
145-
(accept [_ x] (function x))))
145+
(accept [_ x] (f x))))
146146

147147

148-
(defn fn->BiFunction [function]
148+
(defn fn->BiFunction [f]
149149
(reify java.util.function.BiFunction
150-
(apply [_ x y] (function x y))))
150+
(apply [_ x y] (f x y))))
151151

152-
(defn fn->BiConsumer [function]
152+
(defn fn->BiConsumer [f]
153153
(reify java.util.function.BiConsumer
154-
(accept [_ x y] (function x y))))
154+
(accept [_ x y] (f x y))))

test/manifold/deferred_stage_test.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
CompletableFuture
99
Executors]))
1010

11-
(defn fn1->Runnable [function]
11+
(defn fn1->Runnable [f]
1212
(reify java.lang.Runnable
13-
(run [_] (function nil))))
13+
(run [_] (f nil))))
1414

15-
(defn fn2->Runnable [function]
15+
(defn fn2->Runnable [f]
1616
(reify java.lang.Runnable
17-
(run [_] (function nil nil))))
17+
(run [_] (f nil nil))))
1818

1919
;; On these tests:
2020
;; CompletionStage has many methods that mimic the chain, zip and alt

0 commit comments

Comments
 (0)