Guest User

Untitled

a guest
Jan 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. mergeSort [] [] = []
  2. mergeSort [] (h:t) = (h:(mergesort [] t))
  3. mergeSort (h:t) [] = (h:(mergesort [] t))
  4. mergesort (h:t) (a:b) = if h > a
  5. then (h:(mergesort t (a:b)))
  6. else (a:(mergesort (h:t) b))
  7.  
  8.  
  9. **
  10.  
  11.  
  12. "Aurora>" :reload
  13. [1 of 1] Compiling Main ( mergeSort.hs, interpreted )
  14. Ok, modules loaded: Main.
  15. "Aurora>" mergesort "troll" "lol"
  16. "trolol*** Exception: mergeSort.hs:(4,1)-(6,52): Non-exhaustive patterns in function mergesort
  17.  
  18. "Aurora>"
Add Comment
Please, Sign In to add comment