vonbecmann / OrderPreservingDictionary

a little preserving dictionary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Order Preserving Dictionary

Build Status Coverage Status

Installation

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

Usage

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

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)"

About

a little preserving dictionary

License:MIT License


Languages

Language:Smalltalk 97.3%Language:HTML 2.7%