..

Haskell Recursion

  • Why is recursion so important in haskell
    • The absence of for and while loops makes recursion important
  • Implement quickSort
quickSort [] = []
quickSort x:xs = left ++ [x] ++ right where
	left = quicksort [y | y <- xs, y <= x]
	right = quicksort [y | y <- xs, y > x]