Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wittjosiah/elm-ordered-dict
https://github.com/wittjosiah/elm-ordered-dict
elm elm-lang
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wittjosiah/elm-ordered-dict
- Owner: wittjosiah
- License: bsd-3-clause
- Archived: true
- Created: 2017-06-08T13:07:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-19T17:05:01.000Z (over 3 years ago)
- Last Synced: 2024-09-25T22:46:46.199Z (3 months ago)
- Topics: elm, elm-lang
- Language: Elm
- Homepage: http://package.elm-lang.org/packages/wittjosiah/elm-ordered-dict/latest
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**DEPRECATED** this package was merged with [y0hy0h/ordered-containers](https://package.elm-lang.org/packages/y0hy0h/ordered-containers/latest/). For latest updates, please use that package instead.
# elm-ordered-dict
A dictionary mapping unique keys to values preserving insert order
``` elm
import OrderedDict exposing (OrderedDict, empty, insert, insertAt)
example : OrderedDict Int String
example = empty
|> insert 1 "one"
|> insert 3 "three"
|> insert 4 "four"
|> insertAt 1 2 "two"
{-
{ order = [ 1, 2, 3, 4 ]
, dict =
Dict.fromList
[ ( 1, "one" )
, ( 2, "two" )
, ( 3, "three" )
, ( 4, "four" )
]
}
-}
```