Updated to build.

`Data.Array.foldr` had this type: `forall a b. (a -> b -> a) -> a -> [b] -> a`.
`Data.Foldable.foldr` has this type: `forall a b. (a -> b -> b) -> b -> f a -> b`.

So the order of the arguments to `splitOp` had to be reversed. I assumed we want to keep `foldr` rather than `foldl` and the old `splitOp` for semantic reasons.  If not, we can just go with `foldl`. Does the order matter?