Skip to content

Instantly share code, notes, and snippets.

@hauntedhost
Created August 2, 2015 22:58
Show Gist options
  • Save hauntedhost/ee41485d1643e8a08974 to your computer and use it in GitHub Desktop.
Save hauntedhost/ee41485d1643e8a08974 to your computer and use it in GitHub Desktop.
elm-lang set record by field functon
records = { a = 1, b = 2, c = 3 }
fieldSet r v = { r | a <- v }
updateField r f = f r
updateField fieldSet 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment