Hi thanks. I was missing the Result library entirely! On Tuesday, September 27, 2016 at 12:04:14 AM UTC-7, Peter Damoc wrote: > > When you do something that can fail in some way, Elm gives you back a type > that has the failure covered so that you can treat it properly. > The two most frequently used types are > - *Result* where you either have Ok someType OR Err someFailureType > - *Maybe* where you either have Just someType OR Nothing > > In both cases, if you are 100% sure that the operation cannot fail or you > don't want to cover the fail case, you can provide a default value and > unpack the type > > Result.withDefault defaultValue someResult > > or > > Maybe.withDefault defaultValue someMaybe > > > You can read more in the Error handling section of the guide: > https://guide.elm-lang.org/error_handling/ > > > > ... >
-- 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.
