On Jul 7, 2016, at 6:22 PM, Alex Lew <[email protected]> wrote: > > I wrote about a generalization of that pattern a week or so ago, in case > you're interested: > https://medium.com/@alex.lew/the-translator-pattern-a-model-for-child-to-parent-communication-in-elm-f4bfaa1d3f98
I like this approach. It emphasizes that the tagger can be a somewhat more arbitrary translator function — something that common usage patterns obscure. Furthermore, it could be extended to reflect the fact that the translator needed for update results might be different from the translator needed for view results. In particular, the view function in the counter example can be typed as returning an Html (Removable.Msg Counter.Msg) for which it is then the job of the parent view to provide a translator into a parent message. Mark -- 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.
