title: Elm "implies" function
body: <p>I'm looking for an Elm function that does the following:</p>
  
  <pre><code>if e then
    Just a
  else
    Nothing
  </code></pre>
  
  <p>For example, I am looking for an operator <code>(=&gt;) : Bool -&gt; a -&gt; Maybe a</code> (binary function is fine also) that can be used like this</p>
  
  <pre><code>(x == 42) =&gt; "yes"
  </code></pre>
  
  <p>and will return <code>Just "yes"</code> if <code>x == 42</code> and <code>Nothing</code> otherwise.</p>
  
  <p>Clearly, I can use the <code>if-then-else</code> to accomplish the same thing, but I curious if such a function already exists.</p>