1. Is memq broken? memq is an in-built list search function; it finds the first occurrence of a key in a list and returns a new list starting from that key. Now that you know what memq does, lets look at some weird behaviour Building on that foundation leads to the following conundrum memq tests whether the key exists in the … Continue reading SICP Section 3.3 – 3.5 : Found a bug in memq
Tag: SICP
SICP Sections 2.3 & 2.4: Thoughts and Ideas
1. Top-Down Design Most of the problems in the SICP book are solved in a top-down way with lower level details deferred until needed. The focus on high level details makes for expressive flexible code since implementation is based on well-defined interfaces and not implementations. Consequently, swapping and improving interfaces is a cinch - the dependency on high … Continue reading SICP Sections 2.3 & 2.4: Thoughts and Ideas
SICP Section 2.2: New ideas and thoughts about programming
5 things to learn from the SICP book
SICP Section 2.1 : Thoughts
Alhamdulillaah I wrapped up this section a few days ago - 13 of the solutions are here (if you are curious enough); the other three need proofs and I wasn't in the 'mood' for too much interval arithmetic. So what did I learn? 1. More Scheme This chapter introduced the concept of cons, car and cdr for manipulating pairs … Continue reading SICP Section 2.1 : Thoughts
SICP Section 1.3 : Thoughts and Concepts
This section exposed me to the full power and beauty of functional programming. The expressiveness of using functions as values is awesome. For example, a sum of cubes function can use a sum function which itself relies on a reduce function. Think of higher order differentiation in mathematics and you do get the idea. An interesting concept involves … Continue reading SICP Section 1.3 : Thoughts and Concepts
5 things I have gained from SICP: Section 1.2
What I learnt from Chapter 1.2 of the SICP book. A needed pause to reflect on knowledge gained before diving into 1.3.
Reading the SICP BOOK
I have been longing to read the Structure and Interpretation of Computer Programs (SICP) for a long time - a lot of great programmers tout it as one of the 'books' to read. In May I completed JS Allonge (a somewhat challenging read but got to understand the Y-combinator Alhamdulillaah) and I felt it was a good time … Continue reading Reading the SICP BOOK