soucet:: [Int] -> Int
soucet [] = 0
soucet (x:xs) = x + (soucet xs)
soucin:: [Int] -> Int
soucin [] = 1
soucin (x:xs) = x * (soucin xs)
aritm:: Int -> Int -> Int -> [Int]
aritm _ _ 0 = []
aritm a0 d n = (a0:(aritm (a0 + d) d (n-1) ))
splitAt_:: Int -> [a] -> ([a],[a])
splitAt_ n s = ((take n s), (drop n s))
pocetKorenu:: Double -> Double -> Double -> Int
pocetKorenu a b c | disk < 0 = 0
| disk == 0 = 1
| disk > 0 = 2
where disk = b^2 - 4*a*c
split:: [a] -> ([a],[a])
split [] = ([],[])
split [x] = ([x],[])
split (x:y:zs) = (x:xs,y:ys)
where (xs,ys) = split zs
len:: [a] -> Int
len [] = 0
len (x:xs) = 1 + (len xs)
merge:: Ord a => [a] -> [a] -> [a]
merge xs [] = xs
merge [] ys = ys
merge (x:xs) (y:ys) | x <= y = (x: merge xs (y:ys))
| otherwise = (y: merge (x:xs) ys)
mergesort:: Ord a => [a] -> [a]
mergesort [] = []
mergesort [x] = [x]
mergesort u = merge (mergesort u1) (mergesort u2)
where (u1, u2) = split u