| |
==== Hat-Explore 2.04 ==== Call 1/2 =============================
1.
2.
3.
4.
-- Insert.hs -- line 1 to 9 ------------
main = putStrLn (sort ßort")
sort :: Ord a => [a] -> [a]
sort [] = []
sort (x:xs) =
insert :: Ord a => a -> [a] -> [a]
insert x [] = [x]
insert x (y:ys) = if x <= y then x : ys else y : (insert x ys)
|
| |