= Exercise 5.5
// Refs:
:url-base: https://github.com/fenegroni/TGPL-exercise-solutions
:workflow: workflows/Exercise 5.5
:action: actions/workflows/ch5ex5.yml
:url-workflow: {url-base}/{workflow}
:url-action: {url-base}/{action}
:badge-exercise: image:{url-workflow}/badge.svg?branch=main[link={url-action}]
{badge-exercise}
Implement `countWordsAndImages`.
(See Exercise 4.9 for word splitting.)
== Test
This is an example of a function that multiple return values.
Such functions are called _multi values functions_.
For the test's `got` variable I defined a struct `result`.
There's an exported function `CountWordsAndImages`,
which calls upon `countWordsAndImages`:
a recursive function
similar to `Visit` in Exercise 5.1.
We do not test the exported function
nor provide an example of how to call the inner function.
We will test the exported function in the future using `gomock`.
== Example
We don't provide examples for internal functions.