There have been requests for this before. I personally think they'd be
great, but there's not a current way to do it other than lambda.
On Aug 28, 2016 2:42 PM, "Esad Hajdarevic" <[email protected]> wrote:

> Hi,
>
> with the current Elm syntax, is there a way to partially apply a record
> update? Something like
>
> type alias Person = { name: String, age: Int }
>
> p = { name: "Joe", age: 32 }
>
> p.name= :: String -> Person
>
> or
>
> { p | name = } :: String -> Person
>
> or even
>
> { p | name =, age = 30} :: String ->  Person
>
> I'm asking because I'd like to update a record in a pipeline. Wrapping in
> a lambda \x -> { p | name = x } works, but I was wondering if there could
> be a more compact way of doing this.
>
>
>
>
> --
> 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