Reputation: 371
I'm using Lucerne to build an api, and experimenting with generating those apis based off of a list (they're very simple endpoints). The problem is that the views lucerne uses are just functions, so if I pass (gensym)
to the macro at runtime the name of that view function is just set to (gensym)
(or it fails, can't remember which).
I'd like to dynamically name a set of those view functions in a macro that will be in a loop of some kind, each time the code that macro has expanded too is run the functions have a new name (so if I just use a standard gensym
each time the macro was run each of the functions would always have the same name, and overwrite each other). Is there some way to do this?
Upvotes: 0
Views: 100
Reputation: 60014
You probably want to use intern
to create "public" symbols (that the users will be calling by name) and make-symbol
for "private" symbols (that are stored somewhere).
Upvotes: 1