From 7cad36274b436eba71b93516d99aac105d333e44 Mon Sep 17 00:00:00 2001 From: Jeffrey Sylvester <js13g19@soton.ac.uk> Date: Mon, 19 Apr 2021 04:14:46 +0100 Subject: [PATCH] feature: add print2DListLex function --- Print2DListLex.hs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Print2DListLex.hs b/Print2DListLex.hs index aa895ae..0d85356 100644 --- a/Print2DListLex.hs +++ b/Print2DListLex.hs @@ -1,13 +1,7 @@ import Data.List -import Data.Char -import Data.Sequence --- | Function print2aaaDListLex --- 1. takes in a list of records --- 2. prints them in lexicographical order -print2DListLex :: [[String]] -> IO() -print2DListLex (record:records) = sortBy () records +type Row = [String] --- | rearran -rearrange :: [[String]] -> [[String]] -rearrange record \ No newline at end of file +-- | Takes in a list of rows and prints them in lexicographical order +print2DListLex :: [Row] -> IO() +print2DListLex rows = returnIO $ sort rows -- GitLab