Hoogle to search the API docs! (very specific to Haskell)
Now, suppose I'm doing a map on a list, but I don't want everything to map to something. I can say, the type of a function that does this would be
[a] -> (a -> Maybe b) -> [b]
I type this in to Hoogle to get:
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
Okay, so I reversed the arguments. But I found the function based on typing it, which is often more useful than searching the entire index for a function that looks like it would do what I want.
I can then click on the link to get to the documentation to make sure it does what I need:
The mapMaybe function is a version of map which can throw out
elements. In particular, the functional argument returns something of
type Maybe b. If this is Nothing, no element is added on to the result
list. If it just Just b, then b is included in the result list.
Of course, searching docs by index and by module is another good way to figure out the API without memorization.