What will the definition of the Elm function look like, which takes a list of records and performs a groupby operation (see example below)? Using the SQL analogy, I'm basically trying to achieve select last, sum(age) from table group by last
in Elm.
[{name= "John", last= "Smith", age= 10}
,{name="Jason", last= "Smith", age= 9}
, {name="Jane", last ="White", age =5}]
return [{last="Smith", age =19},
{last ="White", age =5}]
source
share