daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top