`elm-mdl` I think calls it `lift`, but is the same pattern. It is the 
pattern that matters, not the name.  :-)

For example, look in the `elm-mdl` demo, it has a Primary message called 
'Mdl' (you could call it anything of course), and that 'Mdl' message is 
passed in to almost all of `elm-mdl`'s functions so that `elm-mdl` can 
return messages that work with the parent naturally that can then get 
passed back in.

And yes, the `elm-mdl` method requires that the model has a key that is 
named `mdl`, it is more limited, but you only ever have one so it is 
generally fine for this case.


On Saturday, August 13, 2016 at 10:44:06 AM UTC-6, Jonathan Duncan wrote:
>
> Thank you OvermindDL1,  that was helpful.
>
>
> I like your first idea of destructing the tuple.  That looks a lot better.
>
>
> I like how your second example looks, is so short and simple which is what 
> I was looking for. But I believe that it implies that the inner component 
> needs to know about the outer components' types. Right?
>
> I looked through https://github.com/debois/elm-mdl but didn't find an 
> example of a mapper.
>
> I only found in the 
> https://github.com/debois/elm-mdl/blob/66a1f2c10cb3850686eb610174710e9fcf176425/src/Material/Layout.elm
>  
> file
>
> but the f parameter isn't used anywhere.
>
> Let me know if you think of any other examples.  Thanks
>
> {-| Component update for Parts. 
> -}
> update' : (Msg -> msg) -> Msg -> Model -> Maybe (Model, Cmd msg)
> update' f action model = 
>

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