Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mergeSort [] [] = []
- mergeSort [] (h:t) = (h:(mergesort [] t))
- mergeSort (h:t) [] = (h:(mergesort [] t))
- mergesort (h:t) (a:b) = if h > a
- then (h:(mergesort t (a:b)))
- else (a:(mergesort (h:t) b))
- **
- "Aurora>" :reload
- [1 of 1] Compiling Main ( mergeSort.hs, interpreted )
- Ok, modules loaded: Main.
- "Aurora>" mergesort "troll" "lol"
- "trolol*** Exception: mergeSort.hs:(4,1)-(6,52): Non-exhaustive patterns in function mergesort
- "Aurora>"
Add Comment
Please, Sign In to add comment