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
My initial reaction is also #3. I think it's totally sensible to do a bit
of transformation when serializing/deserializing, and more important to
optimize your model for its use in view and update.
On Friday, 12 August 2016 23:03:34 UTC+10, Robert Walter wrote:
>
> Hello,
>
> following