>
> 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 <[email protected]>
wrote:

>
> Elm style puts the items last so that you can write:
>
>     items |> replaceItemById id item
>
>
> On Monday, October 24, 2016, Lars Jacobsson <[email protected]>
> 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 that dot notation.
>>
>>
>> I don't know why but
>> items.replaceItemById id item
>> looks better than
>> replaceItemById items id item
>> . Somehow it feels like a standalone function named "replaceItemById"
>> won't give us a list in return. But taking your idea to heart this would
>> then be something like itemsUpdateById
>>
>> --
>> 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.
>>
> --
> 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.
>

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