
7 Apr
2009
7 Apr
'09
6:35 p.m.
On Tue, Apr 7, 2009 at 3:23 PM, Peter Verswyvelen
These functions have their arguments reversed when compare to e.g. Map For example Data.HashTable.lookup :: HashTable key val -> key -> IO (Maybe val)
Data.Map.lookup :: Ord key => key -> Map key val -> Maybe val
I find this a bit odd. Is this by design?
Speaking of design. I think the version in HashTable would be better for partial application in most cases. With that version you can partially apply the hashtable you want to use and then get a function (key -> IO (Maybe val)). So I think most uses wouldn't need to sneak in a flip. Jason