Hi all, I'm really struggling to figure out how to do this code. I'm currently in a class that I am required to take, but I didn't get to take the prerequisites, so there are some things I just don't know. It's a scala based project, I can copy down what it requires in a .txt file. My instructor told me to copy the cumulativelengthimperitavemodular.scala file into a new one called 'topwords.scala', and change the 'results' part in it from String/Int, to a queue? And told me to use a flatmap. I can attach it. I can even paypal a little bit if that helps.
I attached the entire project, but you only need to create the topword or help me with that part, under proj2023\src\main\scala\imperative\modular, the 3 files are the context. I would be so appreciative, even if someone can just guide me. Please let me know.