Skip to content

Instantly share code, notes, and snippets.

@szastupov
Created December 19, 2016 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szastupov/8b4f1cfa3b179fae1c5a1b03dda05bc9 to your computer and use it in GitHub Desktop.
Save szastupov/8b4f1cfa3b179fae1c5a1b03dda05bc9 to your computer and use it in GitHub Desktop.
tfw javascript looks like haskell
const updater = (data, onUpdate) => (field) => (value) => {
onUpdate({
...data,
[field]: value
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment