3
votes
1answer
117 views

Higher-order way of expressing for-style loop in Haskell

I needed to write a function which would 'error diffuse' floating values to integers: errorDiffuse :: Double -> Int -> Double -> [Int] errorDiffuse _ 0 _ = [] errorDiffuse v num err = ...