@@ -23,31 +23,28 @@ prop-tailLengthOneLess : List Int -> Bool
2323
2424prop-splitAtRecombine : Nat -> List Int -> Bool
2525 | n xs :=
26- case splitAt n xs of {
27- lhs, rhs := eqListInt xs (lhs ++ rhs)
28- };
26+ case splitAt n xs of
27+ lhs, rhs := eqListInt xs (lhs ++ rhs);
2928
3029prop-splitAtLength : Nat -> List Int -> Bool
3130 | n xs :=
3231 case
3332 splitAt n (xs ++ replicate (sub n (length xs)) (ofNat 0))
34- of {
33+ of
3534 lhs, rhs :=
36- length lhs == n && length rhs == sub (length xs) n
37- };
35+ length lhs == n && length rhs == sub (length xs) n;
3836-- Make sure the list has length at least n
3937
4038prop-mergeSumLengths : List Int -> List Int -> Bool
4139 | xs ys := length xs + length ys == length (merge xs ys);
4240
4341prop-partition : List Int -> (Int -> Bool) -> Bool
4442 | xs p :=
45- case partition p xs of {
43+ case partition p xs of
4644 lhs, rhs :=
4745 all p lhs
4846 && not (any p rhs)
49- && eqListInt (sortInt xs) (sortInt (lhs ++ rhs))
50- };
47+ && eqListInt (sortInt xs) (sortInt (lhs ++ rhs));
5148
5249prop-distributive : Int -> Int -> (Int -> Int) -> Bool
5350 | a b f := f (a + b) == f a + f b;
@@ -119,15 +116,13 @@ prop-transposeMatrixDimensions : List (List Int) -> Bool
119116 let
120117 txs : List (List Int) := transpose xs;
121118 checkTxsRowXsCol : Bool :=
122- case xs of {
119+ case xs of
123120 | x :: _ := length txs == length x
124- | _ := null txs
125- };
121+ | _ := null txs;
126122 checkXsRowTxsCol : Bool :=
127- case txs of {
123+ case txs of
128124 | tx :: _ := length xs == length tx
129- | _ := null xs
130- };
125+ | _ := null xs;
131126 in checkTxsRowXsCol && checkXsRowTxsCol;
132127
133128sortTest : String -> (List Int -> List Int) -> QC.Test
0 commit comments