git.iko.soy/typeable/validationt
on master help sign in
changed foldl to foldr
commita7d3397ecda3fa6377113fd754806badc2abd70f authoriko <ilyakooo0@gmail.com> dateMon 27 Jan 2020, 19:17 (7 years ago) parent359e531
1 file changed+1−1
src/Control/Monad/Validation.hs+1−1
src/Control/Monad/Validation.hs+1−1
@@ -92,7 +92,7 @@ setMempty setter a = set setter a mempty
9292neConcat :: Foldable f => (a -> a -> a) -> f a -> Maybe a
9393neConcat f a
9494 | F.null a = Nothing
95− | otherwise = Just $ F.foldl1 f a
95+ | otherwise = Just $ F.foldr1 f a
9696
9797textErrors :: [Text] -> Maybe Text
9898textErrors = neConcat (\a b -> a <> ", " <> b)