could someone explain how this code can be reversed? (recursion) : got code from Pierre Fourgeaud (internet) but i cant understand how it can be reversed?

void reverse( string& word )
{
    if ( word.size() <= 1 ) return;

    // Get the string without the first and the last char
    string temp = word.substr( 1, word.size() - 2 );
    // Reverse it
    reverse( temp );

    // Recompose the string
    word = word.substr( word.size() - 1 ) + temp + word[0];
}

thanks.