Of course - for some reason folds had completely escaped my mind.  Thanks, 
Janis.

On Friday, 18 November 2016 11:26:11 UTC, Janis Voigtländer wrote:
>
> 2016-11-18 12:19 GMT+01:00 John Watson <[email protected] <javascript:>>:
>
>  It is interesting to me that Maybe.Extra's or 
>> <http://package.elm-lang.org/packages/elm-community/maybe-extra/3.0.0/Maybe-Extra#or>
>>  
>> function is documented (quite readably) like this:
>>
>> ```elm
>> Just 4 `or` Just 5 == Just 4
>> ```
>>
>> but, of course, backticks have just been consigned to oblivion.
>>
> Well, see https://github.com/elm-community/maybe-extra/issues/28.
>
> About your question how to write something with more than two values to be 
> “or”ed: How about using List.foldl or List.foldr with Maybe.Extra.or as 
> the combining function, and your three or more values put into a list?
>
> Or, of course, use |> and either Maybe.Extra.or or Maybe.Extra.orElse.
> ​
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to