Thanks all for the responses.

For:
"Maybe.map doesn't appear useful as record updates aren't compose-able?)"

I'll reformulate the question: What is the most factored version of the 
following code?

update msg model =
    case msg of
        ToggleDone id ->
            let
                updateEntry t =
                    case t of
                        Nothing ->
                            Nothing

                        Just t ->
                            Just { t | done = not t.done }
            in
                { model | entries = Dict.update id updateEntry 
model.entries }

        UpdateTaskName id newTaskName ->
            let
                updateEntry t =
                    case t of
                        Nothing ->
                            Nothing

                        Just t ->
                            Just { t | name = newTaskName }
            in
                { model | entries = Dict.update id updateEntry 
model.entries }


>

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