> On Jan 11, 2017, at 1:48 PM, Max Goldstein <maxgoldste...@gmail.com> wrote:
> 
> What about:
> 
> case Dict.get id model.displayables |> Maybe.map .view of

You are awesome. 

For the record, here’s the expanded code:

>   case Dict.get id model.displayables |> Maybe.map .view of 
>     Nothing ->
>       model |> noCmd -- Todo: a command to log the error
>     Just (Animal.Viewable _) ->
>       model |> noCmd
>     Just (Animal.Writable form) ->
>       formOp op form model

This would be an excellent thing for a collection of Elm idioms/patterns.

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to