title: how to parse a list with foldr in SML
body: <p>Let's say I have a list:</p>
  <pre><code>type myList = (string * int) list;
  </code></pre>
  <p>And I want to find a specific element of this list using foldr, so something like:</p>
  <pre><code>fun findElement (element : string) (list : myList) : int result =
   if needed_element is equal current_list_element then return current_list_element
   else continue checking the rest of the list
   else return -1
  </code></pre>
  <p>How do I do this?</p>