Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • First and foremost - Thank you for valuable insights! Particularly, I was convinced even before I asked this question that the structure I was pondering could be somehow made/simulated in Lisp itself, just had no idea how (do not know that much). The example that starts from what the pondering was - with a simulation of it - tells and teaches a lot. Commentary adds some sugar on top. I am not sure that there is anything else to add to this but I am inclined to mark this as an answer to the question. At least it is as such to me. Commented Jul 5, 2019 at 18:57
  • 1
    I would like however to leave another note. Lisp books would be much more helpful if they classify sets of s-expressions (later I learned they are called like that because they are 'symbolic' expressions). I know that there is something I can call 'standard' S-exp which is in the form (op list...) which evaluated every member of list (if present) and then do the op. But, not all S-Exps do the same. This is not stressed enough. We shall learn what they are in the concept before we learn what they do. I believe this would be helpful. IMHO. Maybe that becomes obvious by the time. Commented Jul 5, 2019 at 19:02
  • @ljgww: right, symbolic expressions. The 'standard' s-expressions are called 'function forms', where the first operator is a function name and the other elements are arguments, which are in Common Lisp evaluated left-to-right. The other forms are usually called 'macro forms' and 'special forms' (using built-in operators with special behavior). So if we look at an operator, we also need to know if it's a function, a macro (and what kind of macro) or one of the special operators. The Common Lisp standard defines it in detail. A good Lisp book should explain that, too. Important, as you say. Commented Jul 5, 2019 at 19:38
  • Taking note on proper terminology. TY @Rainer (intended as a joke not as question: why it is s-expression and not symbolic-exp? - its about same length :) ) Commented Jul 6, 2019 at 21:13