monad-memo-0.4.1: Memoization monad transformer

Copyright(c) Eduard Sergeev 2011
LicenseBSD-style (see the file LICENSE)
Maintainereduard.sergeev@gmail.com
Stabilityexperimental
Portabilitynon-portable (multi-param classes, functional dependencies)
Safe HaskellSafe
LanguageHaskell98

Data.MapLike.Instances

Contents

Description

Defines MapLike instances declaration for standard data types

Synopsis

Documentation

class MapLike c k v | c -> k, c -> v where #

An abstract interface to the container which can store v indexed by k

Minimal complete definition

lookup, add

Methods

lookup :: k -> c -> Maybe v #

add :: k -> v -> c -> c #

Orphan instances

MapLike (IntMap v) Int v #

Data.IntMap is usually more efficient that Data.Map if k :: Int

Methods

lookup :: Int -> IntMap v -> Maybe v #

add :: Int -> v -> IntMap v -> IntMap v #

Ord k => MapLike (Map k v) k v #

Data.Map is a default implementation (not the fastest but well-known)

Methods

lookup :: k -> Map k v -> Maybe v #

add :: k -> v -> Map k v -> Map k v #