Logo

Programming-Idioms

History of Idiom 51 > diff from v33 to v34

Edit summary for version 34 by morteako:
New Haskell implementation by user [morteako]

Version 33

2017-06-13, 15:22:15

Version 34

2019-07-03, 16:23:22

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Illustration

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Illustration
Extra Keywords
table dictionary hash
Extra Keywords
table dictionary hash
Imports
import qualified Data.Map.Strict as Map
Code
Map.member x m
Comments bubble
Assumes m is an "actual" map,
m :: Map k v.
Doc URL
http://hackage.haskell.org/package/containers-0.6.2.1/docs/Data-Map-Strict.html