General idea of the solution is to generate an infinite list of population growth per year with the recursive function nbYear'. Since Haskell is lazy, I can then use this infinite list to find the first item in the list, which exceeds the goal population.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Lazy Haskell goodness:
General idea of the solution is to generate an infinite list of population growth per year with the recursive function
nbYear'
. Since Haskell is lazy, I can then use this infinite list to find the first item in the list, which exceeds the goal population.