Commit baa362da authored by John van Groningen's avatar John van Groningen

fix function maximum in Data.List for list with 1 element

parent aabd59db
Pipeline #15499 passed with stage
in 1 minute and 48 seconds
......@@ -155,8 +155,8 @@ concatMap :: (.a -> [.b]) ![.a] -> [.b]
concatMap f ls = flatten (map f ls)
maximum :: !.[a] -> a | < a
maximum [x:xs] = max x (maximum xs)
maximum [x] = x
maximum [x:xs] = max x (maximum xs)
maximum [] = abort "maximum of empty list\n"
minimum :: !.[a] -> a | Ord a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment