title: Scheme error in substring function
body: <p>I am new to Scheme and I am trying to implement a simple function for checking the structure of a string. In particular, I am checking if the string is of the form ss
   This is homework so please dont give full answers.. I just have a bug in my code that I can`t fix.</p>
  
  <p>I get </p>
  
  <p>Error: 1 is not a function [(anon), /, /, (anon), display, s, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, CB, /, CB, /, CB, /, CB, /, CB, /, CB, /, /, CB, -, CB, -, CB, -, CB, -, CB, string-length, CB, -, CB, -, CB, -, CB, -, CB, -, CB, -, CB, -, =, CB, -, CB, -, CB, -, CB, -, CB, -, CB, -, CB, -, CB, -, CB, =, CB, =, CB, -]</p>
  
  <p>Here is my code:</p>
  
  <pre><code>  (define CB
       (lambda (s)
          (display "String: ")(display s) 
          (define S_length (string-length s))
          (display " length: ")(display S_length)
              if (not(= S_length 0))
  
              if (even? S_length)
                  (define leftString  (substring s 0 [(- (/ S_length 2) 1)]))
                  (define rightString (substring s (- (/ S_length 2) 1) [(- S_length 1 )]))
                  (string=? leftString rightString)
  
                  )
                  )
  </code></pre>