On Tue, Apr 7, 2009 at 3:23 PM, Peter Verswyvelen <[email protected]> wrote:
> 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
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to