Skip to content

Instantly share code, notes, and snippets.

@kwijibo
Created March 28, 2016 21:35
Show Gist options
  • Save kwijibo/7674faaf722984ffd5e6 to your computer and use it in GitHub Desktop.
Save kwijibo/7674faaf722984ffd5e6 to your computer and use it in GitHub Desktop.
Diff = (before, changes) => { return {
map: f => {
const after = f(before)
const newChanges = diff(before, after)
return Diff(after, [...changes, ...newChanges])
}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment