Open Vaguery opened 6 years ago
take their :transaction steps and concatenate them, producing a new consolidated function on the fly.
:transaction
For example,
(:scalar-add 9 :boolean-or :scalar-≤)
(consume-top-of :scalar :as :arg2) (consume-top-of :scalar :as :arg1) (calculate [:arg1 :arg2] +' :as :prelim) (calculate [:prelim] #(if %1 (Double/isNaN %1) false) :as :nan) (calculate [:nan :prelim] #(when-not %1 %2) :as :sum) (return-item :sum) (calculate [:nan] #(when %1 ":scalar-add produced NaN") :as :warning) (record-an-error :from :warning) (push-onto :scalar 9) ; <- the literal (consume-top-of :bool :as :arg2) (consume-top-of :bool :as :arg1) (calculate [:arg1 :arg2] #(~operation %1 %2) :as :result) (return-item :result) (consume-top-of :scalar :as :arg2) (consume-top-of :scalar :as :arg1) (calculate [:arg1 :arg2] #(< (compare %1 %2) 1) :as :check) (return-item :check)
:scalar
:exec
:boolean
Affected by #175
take their
:transaction
steps and concatenate them, producing a new consolidated function on the fly.For example,
(:scalar-add 9 :boolean-or :scalar-≤)
:scalar
:exec
:scalar
:boolean
:exec
:scalar
:exec