Exactly. I used to think like this when younger, but I now see how stupid this mentality is. Basically anything we care about as humans is “non-productive”. Music, art, video games, musicals, movies, sports, etc. just because I don’t care about something doesn’t mean that it’s not important to someone else.
Using Haskell you can write it way more concise:
However, we can be way smarter by only defining the 2 base cases and then a recursive definition for all other numbers:
It’s having a hard time with negative numbers, but honestly that’s quite a mood