Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minList1 :: Ord a => [a] -> a
- minList1 [x] = x
- minList1 (x:xs) = min x (minList1 xs)
- minList2 :: Ord a => [a] -> a
- minList2 [x] = x
- minList2 (x:y:xs) | x < y = minList2 (x : xs)
- | otherwise = minList2 (y : xs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement