Documentation such as Erlang Std explains individual APIs.
For Java, there are websites that aggregate example code from open-source projects for a given API, keyword, etc. For example, Java Code Example Search. Such sites help to understand the usage of a given API in different scenarios. It also helps to understand how a set of APIs could be collectively used for different scenarios in the correct order.
Is there any similar site for Erlang? Please clarify.
I found one site https://searchcode.com/. It refers to open-source code available in various sources such as github, Google code, etc. It is not on par with Java sites. Something is better than nothing.
Please update this thread whenever you find similar sites.
I studied the Rosetta Code examples in a bunch of languages
in some depth a few years ago. This is code written by
people with time on their hands and can often be substantially
improved. For instance, it’s not terribly rare for submissions
not to solve the intended problem at all.