> On Feb 22, 2017, at 3:21 PM, steenuil <[email protected]> wrote:
> 
> About the code in the post: why not just use a String for the animal? Union 
> types are for when you have a finite number of different states, which is 
> clearly not the case if you're expecting user input.

Animals are full-fledged records, not strings. 
https://github.com/marick/eecrit/blob/master/web/elm/Animals/Types/Animal.elm

> 
> Also, givenOriginalAnimal is just a Maybe.map. 
> http://package.elm-lang.org/packages/elm-lang/core/5.1.1/Maybe#map

It’s a bit different. It doesn’t return a Maybe. Its role is to either apply a 
function to a model or leave the model unchanged.

-- 
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