Creating a new library. Tutorial please

Oh ok, how is that done?

Morse telegraph; // Create in instance
.
.
.
void loop()
{
   telegraph.dot();
}