This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-30
Channels
- # admin-announcements (1)
- # aws (32)
- # bangalore-clj (1)
- # beginners (2)
- # boot (137)
- # cider (2)
- # clara (1)
- # cljs-dev (39)
- # cljsrn (20)
- # clojure (268)
- # clojure-berlin (20)
- # clojure-canada (37)
- # clojure-dev (8)
- # clojure-gamedev (6)
- # clojure-norway (2)
- # clojure-russia (55)
- # clojure-spec (130)
- # clojure-uk (39)
- # clojurebridge (1)
- # clojurescript (102)
- # cursive (20)
- # datomic (231)
- # editors (5)
- # editors-rus (8)
- # events (5)
- # funcool (12)
- # hoplon (31)
- # instaparse (57)
- # jobs (9)
- # lein-figwheel (4)
- # off-topic (2)
- # om (8)
- # om-next (30)
- # onyx (241)
- # planck (6)
- # protorepl (4)
- # re-frame (115)
- # reagent (7)
- # rum (9)
- # schema (1)
- # test-check (9)
- # untangled (24)
- # yada (20)
hey @niwinz i just hit a niggle with cats.core/when
... it's an fn rather than a macro, so any expression of the form (m/when test (throw-up-when-test-is-false))
always throws when test is false... so i tried rewriting when
as a macro, but that still can't avoid evaluating the mv
arg either, because it needs to call ctx/infer
... dyu have any ideas ?
what do you think of this approach ? https://github.com/mccraigmccraig/cats/commit/99d5b9d182cec3b16ff66652153e63402f1e9d2d
i.e. unless a context is available from with-context
it must be explicitly given to when
or unless
makes sense to me @mccraigmccraig, we should change these to be macros because we don't want to evaluate the branch if the predicate doesn't hold
cool, PR on the way @dialelo
my plan is to restrict what's possible in alet
(for instance duplicate binding names) for making the code transformation more straightforward
i haven't found an alet
issue i couldn't work around yet, so i'm still happy ๐