This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
clojure.lang.Var$Unbound - pretty much just exists to say something meaningful via its name in stack trace (and to check for equality to itself of course)
if I want to send emails via sendgrid (or any other mail service) I should still go through my own backend right?
and related question, there seems to be many libraries to do HTTP calls in cljs
So how do I use macros from clojurescript? If I have two files
cljs/a.cljs both with namespace
a. If I
a.cljs, the macro should be available in cljs/a.cljs, correct?
@darwin Aha, right. But I need to be able to use the symbols in the body of the function. Is that even still in the scope of macros?
I'll be more specific about what exactly I want. Now perhaps a macro should not be used for this, but here goes:
@urbank this can be done by a macro, macros simply generate code your would want to write by hand
I just don’t follow why ‘foo and ‘bar have to be quoted, and why you even specify some names there, the generated function will not “expose” them outside
the way you wrote the examples, the macro will generate a code defining a lambda function for you, but names of parameters will be irrelevant at that point
@darwin But you have to tell the macro somehow how many arguments you want and where to put them in the
get-in vector, right?
@darwin Right, that's good, but I don't know what to use to take an arbitrary vector amount of
_s and make them correspond to arguments of a function, and then refer to them in the body of that function. If that makes sense.
p2# can't be referred to directly inside the macro because you don't know in advance the number of
macro gets input code form as data and can do whatever it wants to generate a new form as data which will replace the macro “invocation” in-place - so you can use your clojure-fu to inspect input vector, process
_ positions and generate code based on that
@darwin Heh, not sure what do say. Sounds obvious now that you say it. It is just clojure data structures after all. Thanks! 🙂
@darwin Cool. I'll delve into it tomorrow. Have to get some sleep now. Thanks very much 🙂