Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ challenge

Name: Anonymous 2014-07-16 18:35

Write a macro that, given a term of code, transforms all the calls to the function FOO in that term, and only those calls, into calls to function BAR with the same arguments.
Language: Common Lisp or Scheme.

Name: Anonymous 2014-07-18 23:20

>>44
It's arbitrary if you want the replacement to work on expanded inner macros or not. You can either call macro expand before doing the deep substitution or not call macro expand. I don't know what your use case is in using this macro, but if you want to preserve referential transparency the inner macros must be expanded first.

>>47
You can. But I wont. Do your own research you cock sucking faggot.

>>49
Macros take unevaluated lisp forms as input, which are s-expressions.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List