 access all available @categories@ from /config.yaml/.
      -> Int            -- ^ 'Category' at level @n@ in /config.yaml/.
      -> Course         -- ^ A 'Table' row consisting of only a 'Category' 'Text'.
      -> Maybe Text     -- ^ The first found value matching @categories@ at level @n@.
catAt Config{..} n (cats, _) =
    case [ c | c <- cats, cr <- categories !! n, cr `T.isPrefixOf` c ] of
        x:_ -> Just x
        _   -> Nothing


{- | Get the content of a specific cell from the specified row. This function
    works as a wrapper for the @'getCellContentMaybe'@ function, stripping it
    of the 'Maybe' monad.

    If the @'getCellContentMaybe'@ returns a 'Nothing' it'll return a 'Text'
    saying that the /key couldn't be found/, otherwise it returns the value
    of the cell.
-}
getCellContent :: Text      -- ^ Th
catAt :: Config         -- ^ Used to access all available @categories@ from /config.yaml/.
      -> Int            -- ^ 'Category' at level @n@ in /config.yaml/.
      -> Course         -- ^ A 'Table' row consisting of only a 'Category' 'Text'.
      -> Maybe Text
catAt Config{..} n (cats, _) =
    case [ c | c <- cats, cr <- categories !! n, cr `T.isPrefixOf` c ] of
        x:_ -> Just x
        _   -> Nothing


{- | Get the content of a specific cell from the specified row. This function
    works as a wrapper for the @'getCellContentMaybe'@ function, stripping it
    of the 'Maybe' monad.

    If the @'getCellContentMaybe'@ returns a 'Nothing' it'll return a 'Text'
    saying that the /key couldn't be found/, otherwise it returns the value
    of the cell.
-}
catAt Config{..} n (cats, _) =
    case [ c | c <- cats, cr <- categories !! n, cr `T.isPrefixOf` c ] of
        x:_ -> Just x
        _   -> Nothing


{- | Get the content of a specific cell from the specified row. This function
    works as a wrapper for the @'getCellContentMaybe'@ function, stripping it
    of the 'Maybe' monad.

    If the @'getCellContentMaybe'@ returns a 'Nothing' it'll return a 'Text'
    saying that the /key couldn't be found/, otherwise it returns the value
    of the cell.
-}