[elm-discuss] Re: Modeling cross-references

2016-09-24 Thread Spencer Judd
r of lists that might contain a reference to your record. On Saturday, September 24, 2016 at 4:11:51 PM UTC-4, Spencer Judd wrote: > > I tend to model things like this with Dicts, Sets, and a type alias for > each identifier. So, something like > > type alias Model = > { artists

[elm-discuss] Re: Modeling cross-references

2016-09-24 Thread Spencer Judd
I tend to model things like this with Dicts, Sets, and a type alias for each identifier. So, something like type alias Model = { artists : Dict ArtistId Artist , albums : Dict AlbumId Album } type alias ArtistId = Int type alias Artist = { id : ArtistId , name : String , albums