checkLine :: String -> [CheckError]
checkLine str =
    foldl prependJust [] [ checkLength
                         , checkWhitespaces
                         ]
    where prependJust list mfun | isJust mval = (fromJust mval):list
                                | otherwise = list
                                where mval = mfun str
checkLine :: String -> [CheckError]
checkLine str =
    foldl prependJust [] [ checkLength
                         , checkWhitespaces
                         ]
    where prependJust list mfun | isJust mval = (fromJust mval):list
                                | otherwise = list
                                where mval = mfun str
checkLine str =
    foldl prependJust [] [ checkLength
                         , checkWhitespaces
                         ]
    where prependJust list mfun | isJust mval = (fromJust mval):list
                                | otherwise = list
                                where mval = mfun str