Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Sep 28, 2023
1 parent 0a89f06 commit 1e2cad6
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions test/Test.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ prop-tailLengthOneLess : List Int -> Bool

prop-splitAtRecombine : Nat -> List Int -> Bool
| n xs :=
case splitAt n xs of {lhs, rhs :=
eqListInt xs (lhs ++ rhs)};
case splitAt n xs of {
lhs, rhs := eqListInt xs (lhs ++ rhs)
};

prop-splitAtLength : Nat -> List Int -> Bool
| n xs :=
case splitAt
n
(xs ++ replicate (sub n (length xs)) (ofNat 0)) of {lhs
, rhs :=
length lhs Nat.== n
&& length rhs Nat.== sub (length xs) n};
case
splitAt n (xs ++ replicate (sub n (length xs)) (ofNat 0))
of {
lhs, rhs :=
length lhs Nat.== n && length rhs Nat.== sub (length xs) n
};
-- Make sure the list has length at least n

prop-mergeSumLengths : List Int -> List Int -> Bool
Expand All @@ -47,10 +48,12 @@ prop-mergeSumLengths : List Int -> List Int -> Bool

prop-partition : List Int -> (Int -> Bool) -> Bool
| xs p :=
case partition p xs of {lhs, rhs :=
all p lhs
&& not (any p rhs)
&& eqListInt (sortInt xs) (sortInt (lhs ++ rhs))};
case partition p xs of {
lhs, rhs :=
all p lhs
&& not (any p rhs)
&& eqListInt (sortInt xs) (sortInt (lhs ++ rhs))
};

prop-distributive : Int -> Int -> (Int -> Int) -> Bool
| a b f := f (a + b) == f a + f b;
Expand Down

0 comments on commit 1e2cad6

Please sign in to comment.