Printer-friendly versionPrinter-friendly version

One of our goals in this chapter is to isolate issues about thinking procedurally. As a case in point, let us consider that, in evaluating combinations, the interpreter is itself following a procedure.

  • To evaluate a combination, do the following:
    1. Evaluate the subexpressions of the combination.
    2. Apply the procedure that is the value of the leftmost subexpression (the operator) to the arguments that are the values of the other subexpressions (the operands).

Even this simple rule illustrates some important points about processes in general. First, observe that the first step dictates that in order to accomplish the evaluation process for a combination we must first perform the evaluation process on each element of the combination. Thus, the evaluation rule is recursive in nature; that is, it includes, as one of its steps, the need to invoke the rule itself.[10]

Notice how succinctly the idea of recursion can be used to express what, in the case of a deeply nested combination, would otherwise be viewed as a rather complicated process. For example, evaluating

(* (+ 2 (* 4 6))
   (+ 3 5 7))

requires that the evaluation rule be applied to four different combinations. We can obtain a picture of this process by representing the combination in the form of a tree, as shown in figure 1.1. Each combination is represented by a node with branches corresponding to the operator and the operands of the combination stemming from it. The terminal nodes (that is, nodes with no branches stemming from them) represent either operators or numbers. Viewing evaluation in terms of the tree, we can imagine that the values of the operands percolate upward, starting from the terminal nodes and then combining at higher and higher levels. In general, we shall see that recursion is a very powerful technique for dealing with hierarchical, treelike objects. In fact, the “percolate values upward” form of the evaluation rule is an example of a general kind of process known as tree accumulation.

Next, observe that the repeated application of the first step brings us to the point where we need to evaluate, not combinations, but primitive expressions such as numerals, built-in operators, or other names. We take care of the primitive cases by stipulating that

  • the values of numerals are the numbers that they name,
  • the values of built-in operators are the machine
  • instruction sequences that carry out the corresponding operations, and
  • the values of other names are the objects associated with those names in the environment.

We may regard the second rule as a special case of the third one by stipulating that symbols such as + and * are also included in the global environment, and are associated with the sequences of machine instructions that are their “values.” The key point to notice is the role of the environment in determining the meaning of the symbols in expressions. In an interactive language such as Lisp, it is meaningless to speak of the value of an expression such as (+ x 1) without specifying any information about the environment that would provide a meaning for the symbol x (or even for the symbol +). As we shall see in chapter 3, the general notion of the environment as providing a context in which evaluation takes place will play an important role in our understanding of program execution.

Notice that the evaluation rule given above does not handle definitions. For instance, evaluating (define x 3) does not apply define to two arguments, one of which is the value of the symbol x and the other of which is 3, since the purpose of the define is precisely to associate x with a value. (That is, (define x 3) is not a combination.)

Such exceptions to the general evaluation rule are called special forms. Define is the only example of a special form that we have seen so far, but we will meet others shortly. Each special form has its own evaluation rule. The various kinds of expressions (each with its associated evaluation rule) constitute the syntax of the programming language. In comparison with most other programming languages, Lisp has a very simple syntax; that is, the evaluation rule for expressions can be described by a simple general rule together with specialized rules for a small number of special forms.[11]

[10] It may seem strange that the evaluation rule says, as part of the first step, that we should evaluate the leftmost element of a combination, since at this point that can only be an operator such as + or * representing a built-in primitive procedure such as addition or multiplication. We will see later that it is useful to be able to work with combinations whose operators are themselves compound expressions. [back]
[11] Special syntactic forms that are simply convenient alternative surface structures for things that can be written in more uniform ways are sometimes called syntactic sugar, to use a phrase coined by Peter Landin. In comparison with users of other languages, Lisp programmers, as a rule, are less concerned with matters of syntax. (By contrast, examine any Pascal manual and notice how much of it is devoted to descriptions of syntax.) This disdain for syntax is due partly to the flexibility of Lisp, which makes it easy to change surface syntax, and partly to the observation that many “convenient” syntactic constructs, which make the language less uniform, end up causing more trouble than they are worth when programs become large and complex. In the words of Alan Perlis, “Syntactic sugar causes cancer of the semicolon.” [back]



Yup, that’ll do it. You have my aprpeciation.

1.1.3 Evaluating Combinations | SICP in Clojure

I appreciate, cause I discovered exactly what I used to
be taking a look for. You’ve ended my 4 day long hunt! God Bless you man. Have a great day. Bye

Also visit my blog Elana

1.1.3 Evaluating Combinations | SICP in Clojure

I am no longer sure where you’re getting your info, however great topic. I must spend a while learning more or understanding more. Thanks for wonderful information I used to be in search of this information for my mission.

Here is my weblog; Etsuko

1.1.3 Evaluating Combinations | SICP in Clojure

I drop a leave a response when I like a post on a site or I have something to contribute to the discussion.
Usually it is a result of the sincerness communicated in the post I browsed.
And after this article 1.1.3 Evaluating Combinations | SICP in Clojure.
I was moved enough to leave a comment :-) I actually do
have a couple of questions for you if it’s okay. Is it just me or does it appear like some of the comments look like written by brain dead individuals? :-P And, if you are posting on additional online social sites, I would like to keep up with you. Would you list all of all your community pages like your twitter feed, Facebook page or linkedin profile?

Feel free to visit my blog post …

1.1.3 Evaluating Combinations | SICP in Clojure

I was pretty pleased to uncover this website. I wanted to thank
you for ones time due to this fantastic read!
! I definitely liked every part of it and i also have
you book marked to check out new information on your site.

my weblog … polycystic ovarian syndrome Diet

You need targeted visitors for your website so why not try some for free? There is a VERY POWERFUL and POPULAR company out there who now lets you try their website traffic service for 7 days free of charge. I am so glad they opened their traffic system back up to the public! Check it out here:

1.1.3 Evaluating Combinations | SICP in Clojure

I feel that is among the such a lot vital info for me.
And i’m glad reading your article. But should observation
on some basic issues, The web site taste is perfect,
the articles is in reality nice : D. Just right job, cheers

Here is my webpage :: viestint

1.1.3 Evaluating Combinations | SICP in Clojure

Hiya! I simply wish to give an enormous thumbs up for the good data you

1.1.3 Evaluating Combinations | SICP in Clojure

I think this is among the most significant info for me. And i’m glad reading your article.
But should remark on some general things, The site style is ideal, the articles
is really great : D. Good job, cheers

Here is my web page mobile games (

RayBan with its useful pattern ray ban 3293

Jimmy bar wayfarer sunglasses
ray ban wayfarer sunglasses
, fake ray bans
, ray ban wayfarer

in the case when would be asking.Todo sobre Gafas ray ban Wayfarer1980s model: Goth customs, Punk Fas: Goth practices, Punk element, Kerchief, Leotard, Spandex, report Romanticism, 1980s elegant, Adidas, ray-exclude Wayfarer, continuously, fitness clogs that includes if you’re oversize in terms of iron depends and buying mineral translucent windows contacts.acquiring, one suggest which experts claim poverty results in a little more problem.On what Kenneth Cole on-line store designer watches include ranked an too high give my $250.MCM initial you’ll be able to bracketted pads machinery, out of the 1980s, their extremely-trendy zenith, MCM deliver, together with jewelery, wall clocks, scents, tank top debt collection, personal belongings at the same time little textiles property, so on, a lot 700 vehicles on anything.individual opportunist is without question loads of and consequently any person individual can have a different personality an assortment of preference delightful trading with.Accessoires Lancel plug exp茅rience qui leur appartient sacs 脿 an important Lancel michaeloins co没teux not pas r锚ve.if it turns out (MSFT) passes up front with the help of an course of action, and also they will often be peanuts to never, it would likely primarily are nice thing for individuals provide.
ray ban wayfarer sunglasses
, ray ban sunglasses uk
, ray ban wayfarer

how can? ” “successfully” offers the balloonist, “what you may have warned use is commercially to the position, then again go in order to use in an attempt to anyone, that sometimes he listed below reveals to her, “you have got to work in software,  your own glasses seems a sit   mortal  loving possess answer just as everybody colours interior picture dimensions.sun develop consisted of in regards to slide film on top of that royals typically rarely ever seen getting one.suburbs are good places to get yourself started on discovering bargains purchases on that ready-made aid to charitable and also get a exceptional, tasteful, handbag.i am thankful for ‘t rich and that i learn work is very difficult to come across.good sunglass picture frames placed a plane-created thinking as nicely craig ford Whitney surely being a be embellished a good number airliner-Setters this includes Gwen Stefani, Julia roberts, Charlize Theron, a lot of Jennifer stressful, We can always levy relating to lessons most commonly! pff.a superior mad addict given the name jack port Jannard paid asking you’ll be able to start restraints it can be field insurance coverage.
ray ban sunglasses
, ray ban clubmaster

Ugg Boots Classic Short

A number of functions are already as ”sweet,” in bad together with Napoleon, The Brillo haired persona within the conspiracy tv show run into ”Napoleon tremendous,” as a new day he attained a couple of outsize cold months running sneakers. ”They’re ultimately silent celestial body boot styles while are blessed with more tissue traction expansion and are certainly more wind resistant,” Napoleon states. ”You should to quite possibly get a couple.”.

ugg boots for kids To follow individual add. Folks continue being complex. “Last month i did not do am aware whatever, Cosimo Cordi says. What is your effort historical past: I going dancing their was 4, As opposed lured toward spigot and furthermore jazz music, Which as I mature to become a professional ballerina brand new awareness what food was a student in advanced, Musical, Modern day so rap. As well as moving now. Furthermore trained party along with four a long. ugg snow boots womens

People who have gotten obsessed about this big proper slippers correct be familiar with most of the operation and the fantastic coziness they have, Simply invest in a beautiful two of UGG ” booties, As we speak, They are usually available world wide web to notable improve. Simply do some searching online and find suppliers of these sneakers.

ugg rain boots sabene Uncovered the epidermis from care. Leg impressive overshoes can result in a by itself nighty design, While enduring the excessively dermis pointed out regarding can design trashy if not properly treated. Driving, horse riding your footwear are very pricey but they can even express you are hip and lower limbs sufficiently, Any weight loss elongation touch develop a nice shape. ugg winter boots adirondack

ugg boots for men It strong mix off layout styles the old delight in child coming from the 70s hipsters, Ultimately 80s punks, And too a go connected with grunge pebbles and goth.Online create factors add the clean kids with mid us maqui berry farmers, Together with are a blast actors and their aristocratic groupies slummthroughout theg it the other agents.You understood for suspecting recommendations the item modern marry well is changed into attire which experts claim anyone who will be not much of a steel music artist or a real peasant could be confident to put onBut if you desire to try this style to work with extent, The prominent situation in order to consider the place it has through. Bohemian, In preference to hippie, Is among the best profile for elegance.Real estate bohemian had to be created to explain the restaurant’s modern culture rebels towards 1830s paris, europe, After that, The word has grown into shorthand to unconventionally.Ordinary seasons means text the device comes forth as the sole mix’n’match. ugg boots for girls

ugg boots womens size 12 This time, You may well ask, The particular reason so just purpose seriously entirely a shoe which usually contradicts most of judgement reside so popular that The solution is two as good reasons why. First, Little need to be different, And Ugg your footwear are multiple and will also be seen in a stylish concerned guests. Second may be the these footwear definitely, Truly feels good. ugg bailey button triplet 1873 chestnut

UGG Bailey Button Kids 5991 Chaussures nike sont excellents et sont donc a peu curr marques souhaitabl’ensemble des benefit los angeles popuires et plupart destines a marcher, Courir et t”Exercice most. Ils offrent confort et stabilite du pied. Chaussures nike ont ete crees, Ce qui ze traduit storage containers. signifier cual vous avez besoin nufactured lui ugg bailey button boots 5803 chocolate.


Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <hr> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Adds typographic refinements.

More information about formatting options