So, I\'m new to Haskell and I have this function which works in it\'s current state, but there is a lot of repetition in the code. This is for a school assigment so I can\'t cha