Skip to content

Instantly share code, notes, and snippets.

@franzejr
Created April 6, 2016 16:17
Show Gist options
  • Save franzejr/77c8493f5295726dcc3e4352c753fcea to your computer and use it in GitHub Desktop.
Save franzejr/77c8493f5295726dcc3e4352c753fcea to your computer and use it in GitHub Desktop.
Immutable JS
# How
Interface vs Implementation
Interface as List and Maps
Implementation as as Trie
#Implementation
## Structural Sharing Technique
When we perform one of these mutable behaviors, we will recycle, only replace what has changed.
Directed Acyclic Graph(DAG)
Model all my data as DAG? But I want to use Arrays and Objects.
Hash -> Vector
Object -> Hash Table
So, we have a cool data structure:
#reTrieve
- Index Trie
- Hash Trie
(Hash, Array, Mapped and Trie)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment