Use of lambda for cons/car/cdr definition in SICP
This is an interesting way to represent data: as functions. Notice that this definition of cons returns a lambda which closes over the parameters x and y, capturing their values inside. Also notice that the returned lambda receives a function m as a parameter: ;creates a closure that “remembers’ 2 values (define (cons x y) … Read more