title: Alternating Sum Using Foldr/Foldl (Racket)
body: <p>Back again with another Racket question.  New to higher order functions in general, so give me some leeway.</p>
  
  <p>Currently trying to find the alternating sum using the foldr/foldl functions and not recursion.</p>
  
  <p>e.g. (altsum '(1 3 5 7)) should equal 1 - 3 + 5 - 7, which totals to -4.</p>
  
  <p>I've thought about a few possible ways to tackle this problem:</p>
  
  <ol>
  <li>Get the numbers to add in one list and the numbers to subtract in another list and fold them together.</li>
  <li>Somehow use the list length to determine whether to subtract or add.</li>
  <li>Maybe generate some sort of '(1 -1 1 -1) mask, multiply respectively, then fold add everything.</li>
  </ol>
  
  <p>However, I have no clue where to start with foldl/foldr when every operation is not the same for every item in the list, so I'm having trouble implementing any of my ideas.  Additionally, whenever I try to add more than 2 variables in my foldl's anonymous class, I have no idea what variables afterward refer to what variables in the anonymous class either.</p>
  
  <p>Any help or pointers would be greatly appreciated.</p>