fixed insertSorted Bug

This commit is contained in:
Maxime Vorwerk
2024-04-17 22:04:59 +02:00
parent 43c782078d
commit a7898f859f
14 changed files with 986 additions and 3 deletions

View File

@@ -68,6 +68,6 @@ insertSorted :: (Ord a) => [a] -> a -> [a]
insertSorted [] v = [v]
insertSorted (x:xs) v
| v < x = v:x:xs
| v > x = insertSorted xs v
| v > x = x:insertSorted xs v
| otherwise = x:xs