SICP in JavaScript
It seems like they have attempted to write scheme using JavaScript syntax to avoid having to make any significant changes to the non-code sections of the book.<p>Here is an excerpt, it&#x27;s not good:<p><pre><code>    function deriv(exp, variable) {
        return is_number(exp)
               ? 0
               : is_variable(exp)
               ? is_same_variable(exp, variable) ? 1 : 0
               : is_sum(exp)
               ? make_sum(deriv(addend(exp), variable),
                          deriv(augend(exp), variable))
               : is_product(exp)
               ? make_sum(make_product(multiplier(exp),
                                       deriv(multiplicand(exp),
                                             variable)),
                          make_product(deriv(multiplier(exp),
                                             variable),
                                       multiplicand(exp)))
               : error(exp, &quot;unknown expression type -- deriv&quot;);
    }
</code></pre>
Here is the original code:<p><pre><code>    (define (deriv exp var)
      (cond ((number? exp) 0)
            ((variable? exp)
             (if (same-variable? exp var) 1 0))
            ((sum? exp)
             (make-sum (deriv (addend exp) var)
                       (deriv (augend exp) var)))
            ((product? exp)
             (make-sum
               (make-product (multiplier exp)
                             (deriv (multiplicand exp) var))
               (make-product (deriv (multiplier exp) var)
                             (multiplicand exp))))
            (else
             (error &quot;unknown expression type -- DERIV&quot; exp))))</code></pre>