This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-14
Channels
- # announcements (40)
- # aws (9)
- # babashka (21)
- # beginners (75)
- # calva (56)
- # chlorine-clover (1)
- # cider (12)
- # circleci (1)
- # clj-kondo (7)
- # cljsrn (13)
- # clojars (3)
- # clojure (171)
- # clojure-dev (11)
- # clojure-europe (64)
- # clojure-nl (11)
- # clojure-spec (6)
- # clojure-uk (9)
- # clojurescript (31)
- # conjure (1)
- # cursive (7)
- # datascript (7)
- # datomic (9)
- # emacs (4)
- # fulcro (65)
- # introduce-yourself (1)
- # jobs-discuss (7)
- # kaocha (7)
- # lsp (39)
- # missionary (5)
- # off-topic (54)
- # pathom (10)
- # re-frame (6)
- # shadow-cljs (110)
- # tools-deps (41)
Highly recommend reading this http://sarabander.github.io/sicp/html/4_002e3.xhtml#g_t4_002e3 to understand the amb macro. Would the forms in amb be granted to run only once ?
> Would the forms in amb be granted to run only once ?
no. amb
s can be cancelled, if there are pending branches they will not run and an exception will be thrown
Have you discovered other use case for amb related to async ? The retry is quite elegant.
it is a gold mine, especially in combination with loop
to keep track of state. e.g when you need to emit a value and continue with state that depends on that value, (amb> value (recur value))
is very efficient (cf how-to iterative queries for a similar pattern). It is also a good fit to implement clocks