Post 586566 by phoe@functional.cafe
(DIR) More posts by phoe@functional.cafe
(DIR) Post #586564 by rocx@mastodon.social
2018-10-17T02:10:48Z
0 likes, 0 repeats
Welp. Wrote my first real "use case" of a #Lisp macro. Probably overkill. Mainly because repetitive calls to a function around a single variable gets old real fast and an flet only did so much alone. All that's left is to figure out a better way of dealing with the arguments of puts so it doesn't solely treat it as a list.
(DIR) Post #586565 by phoe@functional.cafe
2018-10-17T07:32:24Z
0 likes, 0 repeats
@rocx Don't you rather want APPLY #'FORMAT if ARGS is a list?
(DIR) Post #586566 by phoe@functional.cafe
2018-10-17T07:41:32Z
1 likes, 0 repeats
@rocx I rewrote the macro slightly, so the value passing happens through rebinding a dynamic variable I introduced. This also allows for otherwise accecssing the request object through that variable if it's later required.I also avoid the FLET and instead expliticly define that function to avoid local functions magically appearing inside macro definitions.I also put the request parameter in the macro lambda list in a list of its own. That's for future extensibility.https://plaster.tymoon.eu/view/972#972