Created
August 2, 2015 22:58
-
-
Save hauntedhost/ee41485d1643e8a08974 to your computer and use it in GitHub Desktop.
elm-lang set record by field functon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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