Skip to content

Commit b50bff8

Browse files
committed
fix: haskell fixture file indentation
1 parent da50eac commit b50bff8

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/fixtures/haskell.hs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ randomList = do
2424
-- Define a function to calculate the median of a list of numbers
2525
median :: [Double] -> Double
2626
median xs = median' (sort xs)
27-
where
28-
median' [] = error "Empty list"
29-
median' [_] = error "List contains single element"
30-
median' xs
31-
| odd len = fromIntegral $ xs !! (len `div` 2)
32-
| otherwise = mean
33-
where
34-
len = length xs
35-
mean = (sum xs) / fromIntegral len
27+
where
28+
median' [] = error "Empty list"
29+
median' [_] = error "List contains single element"
30+
median' xs
31+
| odd len = fromIntegral $ xs !! (len `div` 2)
32+
| otherwise = mean
33+
where
34+
len = length xs
35+
mean = (sum xs) / fromIntegral len
3636

3737
-- Main function to run the program
3838
main :: IO ()
3939
main = do
40-
printEvens [1, 3, 5, 7, 9]
41-
print $ sumNumbers [-2, -4, 0, 10]
42-
randomList >>= mapM_ putStrLn . map show
43-
let xs = [-3.0, -1.0, 0.0, 1.0, 3.0]
44-
ys = [5.5, 6.6]
45-
print $ median xs
46-
print $ sumNumbers ys
40+
printEvens [1, 3, 5, 7, 9]
41+
print $ sumNumbers [-2, -4, 0, 10]
42+
randomList >>= mapM_ putStrLn . map show
43+
let xs = [-3.0, -1.0, 0.0, 1.0, 3.0]
44+
ys = [5.5, 6.6]
45+
print $ median xs
46+
print $ sumNumbers ys

0 commit comments

Comments
 (0)