Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minList1 :: Ord a => [a] -> a
  2. minList1 [x] = x
  3. minList1 (x:xs) =  min x (minList1 xs)
  4.  
  5. minList2 :: Ord a => [a] -> a
  6. minList2 [x] = x
  7. minList2 (x:y:xs) | x < y = minList2 (x : xs)
  8.                   | otherwise = minList2 (y : xs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement