journal/2020-12-23--16-50-17Z--effects_system_in_clojure.org

This commit is contained in:
Yann Esposito (Yogsototh) 2020-12-23 16:58:23 +01:00
parent 1bbd119228
commit e16344b246
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -20,10 +20,21 @@ context the program is executed in.
So for example, let's say you write a program like this:
#+begin_src clojure
(let [x (first-action)
y (second-action)
z (third-action x y)]
(if z
(fourth-action x)
(fifth-action y)))
(defn my-action []
(let [x (first-action)
y (second-action)
z (third-action x y)]
(if z
(fourth-action x)
(fifth-action y))))
#+end_src
Generally you expect every =*-action= to be a well defined function.
You can take a look at that function and see what code will be execute.
Within an effect system, you would be able to write sommething like this:
#+begin_src clojure
(with-effects [])
#+end_src