You noticed that in our output, we are just using strings (via concatenation). From the beginning, we could have returned a real list of the apps from each company. No problem, let's change the code to do that now.
The change is limited to the Platform module. In the signature, for the apps function, we change the output type from string to list(string). And, in the pattern matching part of the function, we change the implementation accordingly, for example, by returning the [appToString(facebook), appToString(messenger), appToString(instagram)] list for Facebook apps.
The main part of the new version is as follows:
/* Platform module, signature followed by implementation */
module type PlatformType = {
let apps: pfcompany => list(string);
};
module Platform: PlatformType = {
let apps = (company: pfcompany...