notas-tsfc/ordenar.hs~

6 lines
139 B
Haskell
Executable File

ordenar [] = []
ordenar (x:xs) = ordenar chico ++ [] ++ ordenar grande
where
chico =[a | a<-xs, a<=x]
grande = [b | b<- xs, b>x]