splaytree-0.1.4: Provides an annotated splay tree

Safe HaskellNone

Data.SplayTree.Map

Synopsis

Documentation

type Map k a = SplayTree (Elem k a)Source

toList :: Map k a -> [(k, a)]Source

fromList :: Ord k => [(k, a)] -> Map k aSource

insert :: Ord k => k -> a -> Map k a -> Map k aSource

insertWith :: Ord k => (a -> a -> a) -> k -> a -> Map k a -> Map k aSource

delete :: Ord k => k -> Map k a -> Map k aSource

lookup :: Eq a => a -> [(a, b)] -> Maybe b

lookup key assocs looks up a key in an association list.

init :: Ord k => Map k a -> Map k aSource