This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Lookup a key in an assoc list
version 1.0.0
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2017-10-08 20:08:50 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

Assoc

Lookup a key in an assoc list

Examples

namesByAges = [("Mary", 30), ("John", 20), ("Ivan", 18), ("John", 100)]
lookup "John" namesByAges == Just 20
lookupAll "John" namesByAges == [20, 100]
lookup "Pete" namesByAges == Nothing
lookupAll "Pete" namesByAges == []

Running tests

To run tests use elm-test