title: Are Scheme functions one liners?
body: <p>I am following <em>Structure and Interpretation of Computer Programs</em> and while attempting to solve Ex 1.3 I arrived at the following code as my first attempt:</p>
  
  <pre><code>(define (sumsq a b c)(
  (define highest (if (&gt; (if (&gt; a b) a b) (if (&gt; a c) a c)) (if (&gt; a b) a b) (if (&gt; a c) a c)))
  (define second_h (if (&gt; (if (&gt; a b) b a) (if (&gt; a c) c a)) (if (&gt; a b) b a) (if (&gt; a c) c a)))
  (+ (* highest highest) (* second_h second_h)))
  </code></pre>
  
  <p>It was not working and I looked up the solution and found them at <a href="http://community.schemewiki.org/?sicp-ex-1.3" rel="nofollow noreferrer">SICP Wiki</a></p>
  
  <pre><code>;; ex 1.3
  ;; implemented using only techniques covered to this point
  
  (define (square x) (* x x))
  
  (define (sum-of-squares x y)
    (+ (square x) (square y)))
  
  (define (largest-two-of-three x y z)
    (if (&gt;= x y)
        (sum-of-squares x (if (&gt;= y z) y z))
        (sum-of-squares y (if (&gt;= x z) x z))))
  </code></pre>
  
  <p>The difference was that I was using multiple statements to define variables and then sum the squares, while the correct way is to define each of my lines as functions. </p>
  
  <p>Are functions in Scheme one liners? Or did I miss the whole thing?</p>