lib/totally_lazy/functions.rb in totally_lazy-0.1.48 vs lib/totally_lazy/functions.rb in totally_lazy-0.1.49
- old
+ new
@@ -34,11 +34,11 @@
-> { raise e }
end
alias call_throws call_raises
- def call
+ def call_fn
->(fn) { fn.() }
end
def flip(fn)
->(a, b) { fn.(b, a) }
@@ -68,12 +68,10 @@
realise.
map(realise_promise)
end
def as_promise
- -> (fn) {
- Concurrent::Promise.new { fn.() }
- }
+ -> (fn) { Concurrent::Promise.new { fn.() } }
end
def execute_with(pool)
-> (promise) {
pool.post { promise.execute }
\ No newline at end of file