Let's say you want that `contains` function from the original post. You'd search for `(Eq a) => a -> [a] -> Bool`, which describes a function that takes two parameters and returns a boolean. The first result[2] is the `elem` function, which is exactly what we wanted!
This is a bit of a contrived example, but I have honestly been surprised by how effective searching by type signature is in Haskell. I wonder if it is possible for a language with a weaker type system, like JavaScript.
[1] https://www.haskell.org/hoogle/
[2] https://www.haskell.org/hoogle/?hoogle=%28Eq+a%29+%3D%3E+a+-...