
25 Aug
2012
25 Aug
'12
2:44 a.m.
On Fri, Aug 24, 2012 at 10:05 PM, Christopher Howard
What is typically used in Haskell circles to provide associative array functionality? (I.e., key-value type arrays.) I'm not really looking for efficiency so much as interface convenience. Obviously I could code it myself based on lists or something, but I don't want to reinvent the wheel.
In simple situations, "coding it yourself" doesn't require much of any code, since the Prelude comes with a lookup function for lists of pairs: lookup :: Eq a => a -> [(a, b)] -> Maybe b -Karl V.