Guest User

Untitled

a guest
Jun 12th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. myMinimum :: Ord a => [a] -> Maybe a
  2. myMinimum [] = Nothing
  3. myMinimum (x:xs) = Just (myMinimum' (x:xs))
  4.  where myMinimum' (x:[]) = x
  5.         myMinimum' (x:xs) = myMinimum' ((min x (head xs)):(tail xs))
Add Comment
Please, Sign In to add comment