fork download
  1. bubblesort xs
  2. | xs == xs' = xs'
  3. | otherwise = bubblesort xs'
  4. where
  5. xs' = bubblesortIterate xs
  6. bubblesortIterate lst@(x:xs)
  7. | null lst = lst
  8. | x <= head xs = x:bubblesortIterate xs
  9. | otherwise = bubblesortSwap lst
  10. bubblesortSwap (x:y:xs) = y:x:xs
  11.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:1:0: The function `main' is not defined in module `Main'
stdout
Standard output is empty