-/* our two comparison lists */
-cmp1 :: [Ordering]
-cmp1 = [[1..3] >< [1..2], [1..2] >< [1..5], (1,2) >< (1,2), (1,3) >-< (1,2), Red >< Yellow, Yellow >< Blue, tree1 >< tree1, tree1 >< tree2, tree2 >< tree1, rose1 >< rose1, rose1 >< rose2, rose2 >< rose1]
-cmp2 :: [Ordering]
-cmp2 = [[1..3] >-< [1..2], [1..2] >-< [1..5], (1,2) >-< (1,2), (1,3) >-< (1,2), Red >-< Yellow, Yellow >-< Blue, tree1 >-< tree1, tree1 >-< tree2, tree2 >-< tree1, rose1 >-< rose1, rose1 >-< rose2, rose2 >-< rose1]
+/* apply a ordering operator on two values */
+order :: (a a -> Ordering) (a, a) -> Ordering
+order f (x, y) = f x y
+
+/* order a list */
+orderList :: (a a -> Ordering) [ (a, a) ] -> [Ordering]
+orderList f [] = []
+orderList f [x:xs] = [ order f x : orderList f xs ]
+
+/* tests to perform */
+orderSetLists = [([1..3], [1..2]), ([1..2], [1..5]), ([1..2], [1..2])]
+orderSetTuples = [((1,3), (1,2)), ((1,2), (1,3)), ((1,2),(1,2))]
+orderSetColors = [(Yellow, Blue), (Blue, Yellow), (Red, Red)]
+orderSetRoses = [(rose2, rose1), (rose1, rose2), (rose1, rose1)]
+orderSetTrees = [(tree2, tree1), (tree1, tree2), (tree1, tree1)]
+
+/* perform orderings */
+test1 = orderList (><) orderSetLists
+ ++ orderList (><) orderSetTuples
+ ++ orderList (><) orderSetLists
+ ++ orderList (><) orderSetRoses
+ ++ orderList (><) orderSetTrees
+test2 = orderList (>-<) orderSetLists
+ ++ orderList (>-<) orderSetTuples
+ ++ orderList (>-<) orderSetLists
+ ++ orderList (>-<) orderSetRoses
+ ++ orderList (>-<) orderSetTrees
+
+/* ordering file output */
+instance <<< Ordering where
+ (<<<) file Equal = file <<< "Equal"
+ (<<<) file Bigger = file <<< "Bigger"
+ (<<<) file Smaller = file <<< "Smaller"
+
+/* ordering list file output */
+instance <<< [Ordering] where
+ (<<<) file [] = file
+ (<<<) file [x:xs] = file <<< x <<< " " <<< xs
+
+/* there is no file <<< Bool instance? */
+instance <<< Bool where
+ (<<<) file True = file <<< "True"
+ (<<<) file False = file <<< "False"