title: Scheme How To Test 2 Conditions in one Clause?
body: <p>I need to create a sub-function that will return me all the adjacent node, which I needed for <a href="https://stackoverflow.com/questions/1575891/question-on-scheme-with-best-first-search-algorithm">this question</a> in Scheme. I'm new to scheme, not sure how I can combine two conditions into one test case ?</p>
  
  <p>Basically my algorithm is to test if the node is on the edge or not. This case I use a 5x5 grid. </p>
  
  <p>If both node is on the corner meaning both is equal to either 1 or 5, than I will have only 2 adjacent node.
  If only one of the node is hit the edge, I will have 3 node return value. 
  If no edge around the node, I will have 4 node return.</p>
  
  <p>My problem is how can I put 2 test case in one clause ? </p>
  
  <pre><code>(define (neighbors l w)
    (if (= 1 l) and (= 1 w)
        (display l w))) --at top left corner
  </code></pre>
  
  <p>Here I want to evaluate if l and w are both equal to 1. Now this doesn't work because I can't use "and" "or" such keywords in the syntax nor I can use &amp; or + to combine them. Any ideas ? Or I should do something else ?</p>