3 ms·
Agreed - that example is amazing. However, the devil's advocate in me can't help but ask: what if I want more than one transformation? What if I want to generat
by mdpopescu 11y ago
Agreed - that example is amazing. However, the devil's advocate in me can't help but ask: what if I want more than one transformation? What if I want to generate both HTML and, say, JSON for returning that information from a web service?
Hmm... it might work if I use some sort of global parameter: I first "execute the data" (damn!) with the output type set to HTML and then do it again with an output type of JSON.
- charlieflowers 11y agoThere's an answer there too. In Lisp, it is possible to have local functions. In other words, you're defining a function, and inside it you have a couple of functions that are local to the containing function. That's one way for "term" and the other items to have different definitions. There are probably other even better ways to do it.