_readConfig (x:xs) dic =
    let strippedLine = strip x
    in case strippedLine of
         "" -> _readConfig xs dic
         '#':_ -> _readConfig xs dic
         ('[':section) -> let (rs, sdic) = _readSection xs Map.empty
                              sectionName = _extractSectionName section
                          in _readConfig rs (Map.insert sectionName (getItems sectionName dic ++ [CfDict sdic]) dic)
         _ -> _readConfig xs (_addConfigValue strippedLine dic)

-- | Take a list of config file lines and parse them into cfg dict.
-- | A strict function would be nice. I did not do up to now, seq would
-- | have to be carried out further down, it's no one liner.
_readConfig (x:xs) dic =
    let strippedLine = strip x
    in case strippedLine of
         "" -> _readConfig xs dic
         '#':_ -> _readConfig xs dic
         ('[':section) -> let (rs, sdic) = _readSection xs Map.empty
                              sectionName = _extractSectionName section
                          in _readConfig rs (Map.insert sectionName (getItems sectionName dic ++ [CfDict sdic]) dic)
         _ -> _readConfig xs (_addConfigValue strippedLine dic)

-- | Take a list of config file lines and parse them into cfg dict.
-- | A strict function would be nice. I did not do up to now, seq would
-- | have to be carried out further down, it's no one liner.
_readConfig (x:xs) dic =
    let strippedLine = strip x
    in case strippedLine of
         "" -> _readConfig xs dic
         '#':_ -> _readConfig xs dic
         ('[':section) -> let (rs, sdic) = _readSection xs Map.empty
                              sectionName = _extractSectionName section
                          in _readConfig rs (Map.insert sectionName (getItems sectionName dic ++ [CfDict sdic]) dic)
         _ -> _readConfig xs (_addConfigValue strippedLine dic)

-- | Take a list of config file lines and parse them into cfg dict.
-- | A strict function would be nice. I did not do up to now, seq would
-- | have to be carried out further down, it's no one liner.