This isn’t at all urgent, but I’m seeing something odd with lambdas in the operator position of a call. Details in thread.
(e/defn Main []
(e/server
(let [F (e/fn [& _]
(e/server (/ 1 0)))]
(F))))
…gives a divide-by-zero error as expected.
But if I refactor, moving the lambda to the operator position of the call…
(e/defn Main []
(e/server
((e/fn [& _]
(e/server (/ 1 0))))))
…that gives: Wrong number of args (0) passed to: clojure.lang.PersistentHashMap
If I pass a single argument like this…
(e/defn Main []
(e/server
((e/fn [& _]
(e/server (/ 1 0)))
1)))
…it returns nil.you can't call an e/fn like that, you need to use e/call
electric sees this as a clojure function call, it doesn't know that the object being called is an e/fn because the call is anonymous, i.e., it isn't a capitalized name
Ah, OK. Thanks.