Re: [elm-discuss] Naming functions

2016-10-24 Thread Joey Eremondi
> > Elm style puts the items last > Also, putting the item last lets you partially apply the rest of the function, so if you wanted to replace by ID on a bunch of items, you could do List.map (replaceItemById id) someListOfItems. On Mon, Oct 24, 2016 at 12:57 PM, Mark Hamburg wrote: > > Elm st

Re: [elm-discuss] Naming functions

2016-10-24 Thread Mark Hamburg
Elm style puts the items last so that you can write: items |> replaceItemById id item On Monday, October 24, 2016, Lars Jacobsson wrote: > | The names were inspired by Dict.insert and Dict.update, which were the > closest to what I was looking for. > > Yeah, I'm probably just too used to th

[elm-discuss] Naming functions

2016-10-24 Thread Lars Jacobsson
Hey you guys! I've started to build out my first real Elm app and I'm loving it. On my model there is a field called items Model ... items : List Item ... which is a list of the type Item. Coming from a rails mindset I created an "updateItemById" -function, which I use like this in