Combineing two loops to run after each other

I was curious to see if there was a way to have http://moving-rainbow.readthedocs.io/en/latest/guide/wipe/ that loop combined with http://moving-rainbow.readthedocs.io/en/latest/guide/theater-chase/ that loop to run after each other

Put the code from each "loop" in its own function and call them one after the other would be the obvious way.

Can you give an example on how to do that?

void setup()
{
  Serial.begin(115200);
}

void loop()
{
  hello();
  world();
  Serial.println();
  Serial.println();
  delay(1000) ;    //for example only
}

void hello()
{
  for (int x = 0; x < 5; x++)
  {
    Serial.println("Hello");
  }
}

void world()
{
  for (int x = 0; x < 5; x++)
  {
    Serial.println("World");
  }
}