I have a function in Haskell which return type is Either error b,
and there is "function x = Right b1" and for the "function (x:xs) b = I want to get something like Right [list of b's]. I don't really know how to explain that, I am new to haskell. I have tried: function (x:xs) = function x <$> function xs and
function (x:xs) b = function x b <*> function xs b, but I get type mismatch errors. The only thing I want is to get not [Right b1, Right b2, ...] but, Right [b1, b2, b3].