{"id":23600,"date":"2023-04-21T07:52:39","date_gmt":"2023-04-21T07:52:39","guid":{"rendered":"https:\/\/www.booksofall.com\/id\/?post_type=product&#038;p=23600"},"modified":"2023-04-21T07:52:39","modified_gmt":"2023-04-21T07:52:39","slug":"structure-and-interpretation-of-computer-programs","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/","title":{"rendered":"Structure and Interpretation of Computer Programs"},"content":{"rendered":"<p><b>1.1 The Elements of Programming\u00a0<\/b><\/p>\n<p>A powerful <a href=\"https:\/\/en.wikipedia.org\/wiki\/Programming_language\">programming language<\/a> is more than just a means for instructing a computer to perform tasks. The language also serves as a framework within which we organize our ideas about processes. Thus, when we describe a language, we should pay particular attention to the means that the language provides for combining simple ideas to form more complex ideas. Every powerful language has three mechanisms for accomplishing this:<\/p>\n<ul>\n<li><b>primitive expressions<\/b>, which represent the simplest entities the language is concerned with,<\/li>\n<li><b>means of combination<\/b>, by which compound elements are built from simpler ones, and<\/li>\n<li><b>means of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Abstraction\">abstraction<\/a><\/b>, by which compound elements can be named and manipulated as units.<\/li>\n<\/ul>\n<p>In programming, we deal with two kinds of elements: procedures and data. (Later we will discover that they are really not so distinct.) Informally, data is \u201cstuff\u201d that we want to manipulate, and procedures are descriptions of the rules for <a href=\"https:\/\/www.questionpro.com\/blog\/data-manipulation\/\">manipulating the data<\/a>. Thus, any powerful programming language should be able to describe primitive data and primitive procedures and should have methods for combining and abstracting procedures and data.<\/p>\n<p>In this chapter we will deal only with simple numerical data so that we can focus on the rules for building procedures. In later chapters we will see that these same rules allow us to build procedures tomanipulate compound data as well.<\/p>\n<p><b>1.1.1 Expressions\u00a0<\/b><\/p>\n<p>One easy way to get started at programming is to examine some typical interactions with an interpreter for the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Scheme_(programming_language)\">Scheme<\/a> dialect of Lisp. Imagine that you are sitting at a computer terminal. You type an <i>expression<\/i>, and the interpreter responds by displaying the result of its\u00a0<i>evaluating\u00a0<\/i>that expression.<\/p>\n<p>One kind of primitive expression you might type is a number. (More precisely, the expression that you type consists of the numerals that represent the number in base 10.) If you present <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lisp_(programming_language)\">Lisp<\/a> with a number<\/p>\n<p>486<\/p>\n<p>the interpreter will respond by printing<\/p>\n<p><em>486<\/em><\/p>\n<p>Expressions representing numbers may be combined with an expression representing a primitive procedure (such as + or *) to form a com- pound expression that represents the application of the procedure to those numbers. For example: (+ 137 349) <i>486<\/i><\/p>\n<p>(- 1000 334)<br \/>\n<i>666<\/i><\/p>\n<p>(* 5 99)<br \/>\n<i>495<\/i><\/p>\n<p>(\/ 10 5)<br \/>\n<i>2<\/i><\/p>\n<p>(+ 2.7 10)<br \/>\n<i>12.7<\/i><\/p>\n<p>Expressions such as these, formed by delimiting a list of expressions within parentheses in order to denote procedure application, are called\u00a0<i>combinations<\/i>. The leftmost element in the list is called the <i>operator<\/i>, and the other elements are called\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Operand\"><i>operands<\/i><\/a>. The value of a combination is obtained by applying the procedure specified by the operator to the <i>arguments <\/i>that are the values of the operands.<\/p>\n<p>The convention of placing the operator to the left of the operands is known as <i>prefix notation<\/i>, and it may be somewhat confusing at first because it departs significantly from the customary mathematical convention. Prefix notation has several advantages, however. One of them is that it can accommodate procedures that may take an arbitrary number of arguments, as in the following examples:<\/p>\n<p>(+ 21 35 12 7)<br \/>\n<i>75<\/i><\/p>\n<p>(* 25 4 12)<br \/>\n<i>1200<\/i><\/p>\n<p>No <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ambiguity\">ambiguity<\/a> can arise, because the operator is always the le\ue039most element and the entire combination is delimited by the parentheses.<\/p>\n<p>A second advantage of prefix notation is that it extends in a straight- forward way to allow combinations to be\u00a0<i>nested<\/i>, that is, to have combinations whose elements are themselves combinations:<\/p>\n<p>(+ (* 3 5) (- 10 6))<br \/>\n<i>19<\/i><\/p>\n<p>\ue049ere is no limit (in principle) to the depth of such nesting and to the overall complexity of the expressions that the Lisp interpreter can evaluate. It is we humans who get confused by still relatively simple expressions such as<\/p>\n<p>(+ (* 3 (+ (* 2 4) (+ 3 5))) (+ (- 10 7) 6))<\/p>\n<p>which the interpreter would readily evaluate to be 57. We can help our- selves by writing such an expression in the form<\/p>\n<p>(+ (* 3<br \/>\n(+ (* 2 4) (+ 3 5)))<br \/>\n(+ (- 10 7)<br \/>\n6))<\/p>\n<p>following a formatting convention known as <i>pretty-printing<\/i>, in which each long combination is written so that the operands are aligned vertically. The resulting indentations display clearly the structure of the expression.<\/p>\n<p>Even with complex expressions, the interpreter always operates in the same basic cycle: It reads an expression from the terminal, evaluates the expression, and prints the result. This mode of operation is often expressed by saying that the interpreter runs in a <i>read-eval-print loop<\/i>. Observe in particular that it is not necessary to explicitly instruct the interpreter to print the value of the expression.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/structure-and-interpretation-of-computer-programs-1bw2rjdl5j?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":23604,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!"},"product_brand":[],"product_cat":[378],"product_tag":[],"class_list":{"0":"post-23600","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-programming","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Structure and Interpretation of Computer Programs - BooksOfAll Indonesian<\/title>\n<meta name=\"description\" content=\"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/\" \/>\n<meta property=\"og:locale\" content=\"id_ID\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Structure and Interpretation of Computer Programs - BooksOfAll Indonesian\" \/>\n<meta property=\"og:description\" content=\"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Indonesian\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Estimasi waktu membaca\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 menit\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/\",\"url\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/\",\"name\":\"Structure and Interpretation of Computer Programs - BooksOfAll Indonesian\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg\",\"datePublished\":\"2023-04-21T07:52:39+00:00\",\"description\":\"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#breadcrumb\"},\"inLanguage\":\"id\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg\",\"width\":\"827\",\"height\":\"1169\",\"caption\":\"Structure and Interpretation of Computer Programs\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/id\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/id\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Structure and Interpretation of Computer Programs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/id\/#website\",\"url\":\"https:\/\/www.booksofall.com\/id\/\",\"name\":\"BooksOfAll Indonesian\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/id\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"id\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/id\/#organization\",\"name\":\"BooksOfAll Indonesian\",\"url\":\"https:\/\/www.booksofall.com\/id\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Indonesian\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Structure and Interpretation of Computer Programs - BooksOfAll Indonesian","description":"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/","og_locale":"id_ID","og_type":"article","og_title":"Structure and Interpretation of Computer Programs - BooksOfAll Indonesian","og_description":"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!","og_url":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/","og_site_name":"BooksOfAll Indonesian","og_image":[{"url":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg","twitter_misc":{"Estimasi waktu membaca":"3 menit"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/","url":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/","name":"Structure and Interpretation of Computer Programs - BooksOfAll Indonesian","isPartOf":{"@id":"https:\/\/www.booksofall.com\/id\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg","datePublished":"2023-04-21T07:52:39+00:00","description":"Explores the principles of programming and computation in a concise and insightful manner in this book now and prepare well for your work!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#breadcrumb"},"inLanguage":"id","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/"]}]},{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#primaryimage","url":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg","contentUrl":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/04\/Structure-and-Interpretation-of-Computer-Programs.jpg","width":"827","height":"1169","caption":"Structure and Interpretation of Computer Programs"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/id\/structure-and-interpretation-of-computer-programs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/id\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/id\/categories\/"},{"@type":"ListItem","position":3,"name":"Structure and Interpretation of Computer Programs"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/id\/#website","url":"https:\/\/www.booksofall.com\/id\/","name":"BooksOfAll Indonesian","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/id\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/id\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"id"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/id\/#organization","name":"BooksOfAll Indonesian","url":"https:\/\/www.booksofall.com\/id\/","logo":{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Indonesian"},"image":{"@id":"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product\/23600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/media\/23604"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/media?parent=23600"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product_brand?post=23600"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product_cat?post=23600"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product_tag?post=23600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}