Touche, I had an omission in my snippet also :)
The getItem should have been:

getItem : List Item -> ID -> Maybe Item
getItem : list id =
  List.filter (\item -> item.id == id) list
  |> List.head


To turn the (maybe empty) list of with the item-to-get into a Maybe Item.

I did use a lot of Dict also for data, but in my code that frequently 
generated a lot of turning Dict into Lists (for rendering, sorting, 
filtering, counting etcetera).
But I guess it depends on typical use case.

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