Tutorial by Examples

An expression in Scheme is what is going to get executed. A S-expression, as it's usually called starts with a ( and end with a ). The first member of the expression is what is going to get executed. The following member of the expression are the parameters that will be sent to the expression during...
The let expressions in scheme are in fact macros. They can be expressed with lambdas. A simple let might look like this: (let ((x 1) (y 2)) (+ x y)) It will return 3 as the value of the last expression of the let body is returned. As you can see, a let-expression is actually executing somethi...
There is a particular syntax that allow us to write cons cell in a more compact way than using the cons constructor. A pair can be written as such: '(1 . 2) == (cons 1 2) The big difference is that we can create pairs using quote. Otherwise, Scheme would create a proper list (1 . (2 . '())). T...

Page 1 of 1