title: Iterate through two lists for substitution
body: <p>I need to create a function that takes two parameters. Both of them are list of strings and one is used as a substitution list for the other. So the function would be called like this - </p>
  
  <pre><code>subs ["the","quick","brown","the"] ["a","dog"] 
  </code></pre>
  
  <p>The output would be - "a quick brown dog". So whenever there's is "the" element in the list, the first "the" is replaced with the first element of the substitution list and the second "the" will be substituted with the second element from the substation list. I can use foldr to iterate through the first list but I don't know how to keep track of substitution list so that the element that is already used won't be used again. Any suggestion?</p>