On Sat, Aug 13, 2011 at 14:04, Dennis Raddle <dennis.raddle@gmail.com> wrote:
Can someone suggest an elegant way to write the following?

fn :: [Maybe Float] -> Maybe Float

in which, if the input list has all Nothing, then the result is Nothing
if the input list has one or more Just x, then the result is Just x
(in which the x is picked arbitrarily, could be the first one or last
one)

Isn't this just mconcat?

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms