Haskell: to fix or not to fix
问题 I recently learned about Data.Function.fix, and now I want to apply it everywhere. For example, whenever I see a recursive function I want to " fix " it. So basically my question is where and when should I use it. To make it more specific: 1) Suppose I have the following code for factorization of n : f n = f' n primes where f' n (p:ps) = ... -- if p^2<=n: returns (p,k):f' (n `div` p^k) ps for k = maximum power of p in n -- if n<=1: returns [] -- otherwise: returns [(n,1)] If I rewrite it in