Skip to content

pharo-contributions/OrderPreservingDictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Order Preserving Dictionary

OrderPreservingDictionary preserves the order in which elements were added to to it.

Unit Tests Coverage Status

Pharo 6 Pharo 7 Pharo 8 Pharo 9 Pharo 10 Pharo 11 Pharo 12 Pharo 13

Quick Start

Installation

Metacello new
	baseline: 'OrderPreservingDictionary';
	repository: 'github://pharo-contributions/OrderPreservingDictionary/src';
	load.

Usage

Basic Dictionary

(dict := Dictionary new)
	at: #apple put: 20;
	at: #orange put: 15.

dict keys. "#(#orange #apple)"

OrderPreservingDictionary

(dict := OrderPreservingDictionary new)
	at: #apple put: 20;
	at: #orange put: 15.

dict keys. "#(#apple #orange)"