Fork me on GitHub
#clojure
<
2021-03-28
>
piotrts14:03:10

Just curious:

(for [elem [1 2 3]
      :let [elem+1 (inc elem)]]
  elem+1)
=> (2 3 4)
but
(for [:let [elems [2 3 4]]
      elem elems]
  elem)
Syntax error macroexpanding for at (core.clj:12:1).
Can't pop empty vector
is there a reason behind this behaviour? I think :let here makes sense

borkdude14:03:19

I think there is a JIRA issue for it somewhere, but not very high priority, maybe even rejected. Just use a surrounding let in this case.

piotrts14:03:28

yep, this is what I am doing

ayushka14:03:44

Can anyone recommend a lib for managing datomic schema migrations with the client api library?