Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Inheritance cheatsheet #167

Open
Methuselah96 opened this issue Oct 17, 2020 · 0 comments
Open

Inheritance cheatsheet #167

Methuselah96 opened this issue Oct 17, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation from-original-repo

Comments

@Methuselah96
Copy link

From @challet on Mon, 23 Dec 2019 18:02:48 GMT

Hello, I've put together some info from the docs in order to remember which structure does what. Thought it might be of interest for other newbies like me, please give me the direction if that could be a contribution to a documentation file.

Class                   Abstract                                                                                       
---                     ---                                                                                            
Collection            > The Collection is a set of (key, value) entries which can be iterated.                         
├─ Collection.Indexed > Indexed Collections have incrementing numeric keys.                                            
│  ├─ List            > Lists are ordered indexed dense collections, much like a JavaScript Array.                     
│  └─ Stack           > Stacks are indexed collections. | **O(1)** addition and removal from the front.                
├─ Collection.Keyed   > Keyed Collections have discrete keys tied to each value.                                       
│  └─ Map             > Immutable Map is an unordered Collection.Keyed of (key, value). | **O(log32 N)** gets and sets 
│     └─ OrderedMap   > Guarantee that the iteration order of entries will be the order in which they were set().      
├─ Collection.Set     > Set Collections only represent values. They have no associated keys or indices.                
│  └─ Set             > A Collection of unique values | **O(log32 N)** adds and has                                    
│     └─ OrderedSet   > Guarantee that the iteration order of values will be the order in which they were added.       
└─ Seq                > Seq describes a lazy operation.                                                                
   ├─ Seq.Indexed     > Seq which represents an ordered indexed list of values. Also inherits Collection.Indexed.    
   ├─ Seq.Keyed       > Seq which represents key*value pairs. Also inherits Collection.Keyed.                        
   └─ Seq.Set         > Seq which represents a set of values. Also inherits Collection.Set.                          
Record                > Similar to a JS object, enforces a specific set of allowed string keys, and has default values.
Record.Factory        > Record instances are created by passing it some of the accepted values for that Record type    
Range()               > Returns a Seq.Indexed of numbers from start (inclusive) to end (exclusive), by step.           
Repeat()              > Returns a Seq.Indexed of value repeated times times.                                                                   

Copied from original issue: immutable-js#1756

@Methuselah96 Methuselah96 added from-original-repo documentation Improvements or additions to documentation labels Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation from-original-repo
Projects
None yet
Development

No branches or pull requests

1 participant