Would anybody besides me be interested in being able to manipulate module?
I was thinking something on the lines of:
getUpdate : m -> (m.Model -> m.Msg -> m.Model)
getUpdate module =
module.update
Then if you have a module, say
module Counter exposing (update, Msg, Model)
type Model = Int
type Msg = Increment | Decrement
update : Model -> Msg -> Model
update model msg =
case msg of
Increment ->
model + 1
Decrement ->
model - 1
you could use
update = getUpdate Counter
I think it would allow meta module operations such as putting a list of
modules in a view or a list of updates in one big SPA update.
What do you think?
--
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.