Skip to content

Commit

Permalink
Change promise--{t, nil, zero, emptystring} to a public variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaro committed Mar 7, 2021
1 parent d7b5980 commit cec51fe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions promise-es6-extensions.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@
(promise-_value p) value)
p))

(defconst promise--t (promise--value t))
(defconst promise--nil (promise--value nil))
(defconst promise--zero (promise--value 0))
(defconst promise--emptystring (promise--value ""))
(defconst promise-t (promise--value t))
(defconst promise-nil (promise--value nil))
(defconst promise-zero (promise--value 0))
(defconst promise-emptystring (promise--value ""))

(defun promise-resolve (value)
(cond
((promise-class-p value) value)

((eq value t) promise--t)
((eq value nil) promise--nil)
((eq value 0) promise--zero)
((eq value "") promise--emptystring)
((eq value t) promise-t)
((eq value nil) promise-nil)
((eq value 0) promise-zero)
((eq value "") promise-emptystring)

((promise--is-object value)
(condition-case ex
Expand Down

0 comments on commit cec51fe

Please sign in to comment.