DEV Community

Discussion on: I am the author of Elm in Action. Ask Me Anything!

Collapse
 
borisrozinov profile image
Boris Rozinov

is it anti pattern to use Message like: UpdateModel (Model -> Model). When handling of the message is just to update model with function passed as parameter like:
case msg of
UpdateModel f -> (f model, Cmd.none)

.....

Collapse
 
rtfeldman profile image
Richard Feldman

That seems overcomplicated, yeah. I wouldn't do that. :)