To get element N + 1, you take the _N_th element of the list that’s in this list’s rest property. To get the zeroeth element of a list, you simply take the value property of its head node. Building your own programming language is surprisingly easy (as long as you. Hal Abelson and Gerald Sussman, Structure and Interpretation of Computer Programs. ![]() The evaluator, which determines the meaning of expressions in a programming language, is just another program. The recursive version of nth will, similarly, look at an ever smaller part of the “tail” of the list and at the same time count down the index until it reaches zero, at which point it can return the value property of the node it is looking at. This third edition introduces new features covering the 2017 version of JavaScript, such as class notation, arrow functions, iterators, async functions, template strings, and black scope. Chapter 12 Project: A Programming Language. Around chapter 5 and 6, I get really lost. The book is divided into 3 parts: Covered topics in this part include. I already finished JavaScript on Code Academy, so I started reading Eloquent JavaScript. 5 of Eloquent JS it shouldn't be to hard to catch up. When that is null, we have reached the end of the list and the loop is finished. Eloquent JavaScript is a book that helps you to learn the basics of JavaScript. You can find the books online and actually there's a study group going on right now ( r/learnjsproperly) and we are in the third week, so, if you have read and understood up to ch. At the end of an iteration, node moves to the next sublist. rest = 'undefined' ) Ĭan you see how that works? Every iteration of the loop, node points to the current sublist, and the body can read its value property to get the current element.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |