title: How can i use the removing for the following in scheme?
body: <p>I am given two lists in scheme and check whether we can form the one of them from the elements of the other. In other words, i check whether this is an . To do this, i implemented a function called member?, which takes a symbol and a list, and if this symbol is in the list then this function removes that symbol from the list and returns the new list. The sample input-output for the function is like the following:</p>
  
  <p>I am thinking about doing the following: Since we have two lists to check the , i take the first list and for each symbol in that list, by using member? function, i check whether that symbol occurs in the other list. Finally at the end, if it is an then we have an empty list. Here is some trials to do this:</p>
  
  <pre><code>(define member?
   (lambda (inSym inSeq)
  (if (and (symbol? inSym) (sequence? inSeq)) ; can remove?       
     (remove-member inSym inSeq)             ; then remove!       
     'can-not-remove))) ; otherwise, present an error message
  
  (define 
   (lambda (inSeq1 inSeq2)
      (if (and (sequence? inSeq1) (sequence? inSeq2)) ;if both are sequences
          (if(equal? '() (member? (car inSeq1) inSeq2))) ... ???
   )
  )
  </code></pre>
  
  <p>I could not organize the recursion needed here. Can anyone help me with this?</p>
  
  <p>Thank you.</p>