cats
cats copied to clipboard
alet dependency inference
the alet macro seems to require that variables are referenced in the top-level of binding forms in order to infer dependencies
thus when i am calling some functions created with defnk i have to add artificial do blocks and explicitly refer to dependent variables like this https://www.refheap.com/88d7eba3d8eb9c73e2834f4d4
this seems like a reasonable limitation for the macro - but should be documented
Hmm, this limitation shouldn't be there. You should be able to write:
(with-context pm/promise-context
(alet [api-version (version {})
auth-user (retrieve-user {:token token})
auth-org-users (get-auth-org-users {:auth-user auth-user})
;; ...
Going to take a look at this, thanks for reporting!