title: Elm try to convert string to option type
body: <p>Is there any way in Elm to try and convert a string to an option type? Something a bit like...</p>
  
  <pre><code>conversionFunction : String -&gt; MyOption
  conversionFunction str = 
      case *SomeConvertionFunction* str of
          Nothing -&gt; DefaulOption
          Just i  -&gt; i
  
  recievingFunction : List String -&gt; List MyOption
  recievingFunction list = 
      List.map (conversionFunction) list
  </code></pre>
  
  <p>I am trying to parse something from a URL, but I can see that happening a lot in the app I am building. I can also see why this might be difficult when data is attached, but quite useful for enumerations. I don't really want to have to write a case statement for all the strings in the enumeration by hand due mostly to laziness.</p>
  
  <p>It seemed like it would be something in the core libraries, but I can't find it.</p>