Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inheritance cheatsheet #1756

Copy link
Copy link
Closed
Closed
Copy link
@challet

Description

@challet
Issue body actions

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.                                                                   

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.