Open yyoncho opened 4 years ago
What do you think about defining a set of anamorphic versions of the functions, like this:
(defmacro deferred::nextc (d &rest body) ;; the prefix could be different. `(deferred:nextc ,d (lambda (result) ,@body)))
Here it is how the readme example will look like(using dash's ->).
->
(-> (deferred::next (message "deferred start")) (deferred::nextc (message "chain 1") 1) (deferred::nextc (message "chain 2 : %s" result)) (deferred::nextc (read-minibuffer "Input a number: ")) (deferred::nextc (message "Got the number : %i" result)) (deferred::error (message "Wrong input : %s" error)))
any thoughts?
What do you think about defining a set of anamorphic versions of the functions, like this:
Here it is how the readme example will look like(using dash's
->
).