I am learning Haskell and as exercise I am doing Project Euler Problems. In this case PE1.-- Sum any given finite Airthmetic ProgressionsumAP :: Integer -> Integer -> Integer -> IntegersumAP first limit step = do  let last  = limit - (limit `rem` step)  let terms = (last - first) `quot` step + 1  let avg   = first + last  terms * avg `quot` 2Now, off the bat I am shadowing the last function. How could I rename this variable along with first?Is there any way I can improve readability? Any edge case or fail case I haven't covered? Any performance fail?
Sum Arithmetic Progression in Haskell
programming challenge;haskell