foldr と foldl で結果が異なるような場合ってありますか?
Prelude> foldl const 0 [1..9] 0 Prelude> foldr const 0 [1..9] 1
ghci> foldl (\a b -> 10*a + b) 0 [1,2,3] 123 ghci> foldr (\a b -> 10*a + b) 0 [1,2,3] 60
ghci> quickCheck $ \dbls -> foldr (+) 0.0 (dbls :: [Double]) === foldl (+) 0.0 dbls *** Failed! Falsified (after 9 tests and 16 shrinks): [0.1,1.0,-6.2] -5.1000000000000005 /= -5.1 ghci> foldr (+) 0.0 [0.1,1.0,-6.2] -5.1000000000000005 ghci> foldl (+) 0.0 [0.1,1.0,-6.2] -5.1
ghci> quickCheck $ \dbls -> foldr (*) 1.0 (dbls :: [Double]) === foldl (*) 1.0 dbls *** Failed! Falsified (after 7 tests and 11 shrinks): [-1.0e-2,0.1,-3.0] 3.0000000000000005e-3 /= 3.0e-3