Promises can be invoked to deliver a value to them (same result as calling {{deliver}}), but this is not mentioned in the docstring:
(def p (promise))
(p 42) ;; same as (deliver p 42)
@p ;; 42
Docstring before:
Returns a promise object that can be read with deref/@, and set,
once only, with deliver. Calls to deref/@ ...
Proposed: Change docstring to:
clojure.core/promise
([])
Returns a promise object that can be read with deref/@, and set,
once only, with deliver or by invoking the promise. Calls to
deref/@ ...
Patch: clj-2480-2.patch
Prescreened by: Alex Miller