MR closed. Abstract in functions

Hi everyone, recently I am trying to do my first MR but it cannot be approved and I am getting this answer that I have to correct: “Try to abstract the problem into small independent functions with a clear contract”. This is the beginning of my solution

I was taking that message as if I had to summarize all my code in functions, so I summarized as much as I could and got this

Captura de Pantalla 2020-08-08 a la(s) 01.32.52

There are two main functions. Guess is the function that has the solution to the problem and printresult as its name implies is to print the result in a function. But it is not the solution because I get the same message. Now I am thinking that it is because there is no main function. So I have to put the code in a main function like this?

Or what is the solution to solve the problem and make corrections because I do not understand the message well. Thanks for your attention and your help.

I had the same comment on a previous merge request, I thought it was because I had several repetitive lines of code for managing and appending to a linked list so I created an “object” for the linked list with the respective methods for appending, thus abstracting my code and the MR was approved.
Maybe if you use an object oriented approach and try to keep the code repetition to a minimum?.

avoid object orientation, focus on functional style with simpler abstractions