f :: Int-> Int-> Int f m n | notNil xs = front xs | otherwise = n where xs= [m .. n] front :: [Int] -> Int front (x:y:zs) = x+y front [x] = x notNil :: [a] -> Bool notNil [] = False notNil (_:_) = True