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-17 8:48

>>14

One of the very first lessons of the wizard book is that data is a type of abstract being that inhabits the computer (programs are another). Indeed programs are a kind of data which is executable by some other program. An executing program is called a process.

A Lisp program is a collection of Lisp objects, which are data. Sometimes a Lisp program is called "Lisp code".

The syntax (or structure) of a Lisp program is defined in terms of Lisp objects.

Text can be read by some program (possibly a Lisp program) which generates Lisp objects during the time it is reading that text. Conventionally, a program that reads text and generates Lisp objects is called a Lisp reader.

Lisp objects that are read in by a Lisp reader may also be Lisp programs.

One family of textual syntaxes Lisp readers usually understand are called "S-expressions". However there are others e.g. "M-expressions", "Sweet expressions" etc.

I hope this answers your questions.

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