bide looks neat βΒ is there a reason it's cljs only?
@mattly Because I needed it for cljs. But I open to have it ported to clj π
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
happy to merge a PR with these changes
cool, PR on the way @dialelo
thanks a lot!
sorry about the alet
issues, i'm taking a look at it
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 π