FUNCTION Flip(S: String) RETURN String IS -- Pre: S is defined -- Post: returns the reverse of S C : Character; -- to save the first character of S BEGIN -- Flip IF S'Length <= 1 THEN RETURN S; ELSE C := S(S'First); RETURN Flip(S(S'First + 1 .. S'Last)) & C; END IF; END Flip;