<div dir="ltr">On Sat, Aug 13, 2011 at 14:04, Dennis Raddle <span dir="ltr">&lt;<a href="mailto:dennis.raddle@gmail.com">dennis.raddle@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Can someone suggest an elegant way to write the following?<br>
<br>
fn :: [Maybe Float] -&gt; Maybe Float<br>
<br>
in which, if the input list has all Nothing, then the result is Nothing<br>
if the input list has one or more Just x, then the result is Just x<br>
(in which the x is picked arbitrarily, could be the first one or last<br>
one)<br></blockquote><div><br></div><div>Isn&#39;t this just mconcat?</div><div><br></div></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>
wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br><br>
</div>