-- |Concatenates transactions succesfully loaded from specified paths.
loadTransactionFiles :: [FilePath] -> IO [Transaction]
loadTransactionFiles paths = do
  tss <- mapM loadTransactionFile paths
  return $ concat (map removeFailed tss)
  where removeFailed (Right ts) = ts
        removeFailed (Left _) = []

-- |Loads transactions from the CSV file at the specified path.
loadTransactionFiles :: [FilePath] -> IO [Transaction]
loadTransactionFiles paths = do
  tss <- mapM loadTransactionFile paths
  return $ concat (map removeFailed tss)
  where removeFailed (Right ts) = ts
        removeFailed (Left _) = []

-- |Loads transactions from the CSV file at the specified path.
loadTransactionFiles paths = do
  tss <- mapM loadTransactionFile paths
  return $ concat (map removeFailed tss)
  where removeFailed (Right ts) = ts
        removeFailed (Left _) = []

-- |Loads transactions from the CSV file at the specified path.